11-03-2023 06:08 AM
Hello,
im trying to convert a MuleSoft API to snapLogic. In one of the Mule flows, a choice block is used and the expression sizeOf(payload)==1 is evaluated. How can this same logic be used in snap? Im having trouble accessing payload as snapLogic says payload is undefined. Im trying to use this in the router snap. Im trying to figure out how to write an expression that will evaluate the sizeOf the payload.
Solved! Go to Solution.
11-03-2023 08:02 AM
The SQL Select Snap will not gives you the result as array.
So, after the SQL Select Snap try to group the output from the select, using Group by N snap, and then calculate the length of the group/array using the length function.
11-03-2023 06:32 AM - edited 11-03-2023 06:33 AM
11-03-2023 07:21 AM
How can this be done?? Im trying to get the sizeOf or length of the payload coming from a SQL select. The attachment shows what is returned from the SQL select. In the next step, how can I access payload from the router snap? There is no array available to do anything with?
11-03-2023 08:02 AM
The SQL Select Snap will not gives you the result as array.
So, after the SQL Select Snap try to group the output from the select, using Group by N snap, and then calculate the length of the group/array using the length function.