How to Determine how many data items returned from a Web Activity in a pipeline?

Mike Kiser 1,536 Reputation points
2021-05-15T19:46:39.287+00:00

Hello! @Nasreen Akter @MartinJaffer-MSFT

I have run into a road block. I get the following back from a web activity call. Usually it is one data item, but sometimes like this case it is 2. In the pipeline if it is 2, I need to do a ifelse or switch or something for how many accounts are returned, but how do I know to loop through twice if there is more than one account in the Data items?
Thanks,

Mike

{
"Data": [
{
"AccountNumber": "xxxxxxxx",
"BankName": "<Not Applicable>",
"DepositNumber": 1,
"DepositValue": 100,
"PayMethod": {
"XRefCode": "CHECKING",
"ShortName": "Checking",
"LongName": "Checking"
},
"IsDeleted": false,
"IsPercentage": false,
"IsRemainder": false,
"NumberOfPreNoteDays": 0,
"RequiresPreNote": false,
"RoutingTransitNumber": "xxxxxxxx",
"LastModifiedTimestamp": "2021-01-26T21:29:02Z"
},
{
"AccountNumber": "xxxxxxxx",
"BankName": "<Not Applicable>",
"DepositNumber": 2,
"PayMethod": {
"XRefCode": "CHECKING",
"ShortName": "Checking",
"LongName": "Checking"
},
"IsDeleted": false,
"IsPercentage": false,
"IsRemainder": true,
"NumberOfPreNoteDays": 0,
"RequiresPreNote": false,
"RoutingTransitNumber": "xxxxxxxxxxx",
"LastModifiedTimestamp": "2021-01-26T21:29:02Z"

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,579 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Nasreen Akter 10,811 Reputation points Volunteer Moderator
    2021-05-17T17:05:49.46+00:00

    Hi @Mike Kiser ,

    You can try length() function. Thanks!

    2 people found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.