Hi Community,
Hope you can help. I have parsed a CSV using the TachyTelic approach. How to Parse a CSV in Microsoft Power Automate
I started with the Create a file in File System when a new email arrives in a shared mailbox template. Inside the condition is an Apply to Each.
I need to be able to add some validation to the returned values. For example I need to ensure the length of SAPAgentNo is 6 characters. I guess the approach would be to put the output into an array but the problem is I am inside an Apply to Each so I cannot Initialize a Variable. How can I validate the value in my Parse JSON array
THANKS
Hi @TediBear
From the above given error the schema was expecting an array of string values. Now it is getting integer value. Check the previous step of Parse JSON where you passing from Flow run history. Compare the old successful run record vs the current failure. You could see there are differences in data. Its a data issue.
Thanks
Hello Community!
My values stopped working since couple of days ago. Please help! Thank you in advance.
n
Many Thanks @abm
So i have gone for the second approach and am able to return the value length. So far so good, but I need to perform and action. For example : Send an e-mail if the value length is less than the required length.
Can you guide me on how I would achieve that ?
If expression using my compose would work right ?
Thanks
Hi @DDM
Yes you can't put initialise inside the apply to each loop. What you need to do is add an action step initialise variable before the Parse JSON Step. Then after the parse JSON step you need to add action step 'Set Variable' and map the Dynamic value from the previous parse JSON step.
Another way you could do is add a compose statement after the parse JSON step. Map the Dynamic value. Then next step add another compose and set an expression called length(). Here map the previous output of the compose.
Thanks
stampcoin
97
Michael E. Gernaey
82
Super User 2025 Season 1
David_MA
48
Super User 2025 Season 1