Hello,
I have a html form im submiting to a Flow in Power Automate, the issue is that even though there is data available in the body the flow cant seem to get it, see below:
If anyone has any ideas on how i can solve this please let me know 🙂 Thanks!
Solved! Go to Solution.
I believe your input for the Apply to each should be the following. Without the ['body'] since you're already using triggerBody.
@{triggerBody()?['$formdata']}
If you were using triggerOutputs then it would likely be:
@{triggerOutputs()?['body']?['$formdata']}
Hi @StretchFredrik,
What type of expression are you using in the condition?
Is that
item()
is equal to hejsan?
If that is the case, can you change it to:
item()['value']
is equal to hejsan instead?
Hi @StretchFredrik,
Can you add the same expression in a compose before the condition? This way you can troubleshoot what value it is retrieving within the apply to each loop.
Since it's using the input from your Apply to each it would be in the format:
//Change Apply_to_each to match the actual name of your Apply to each
items('Apply_to_each')?['value']
@Expiscornovus the compose just becomes empty, which I dont understand because it clearly has a value if you look at my output from the trigger.
Thanks for your reply, tried that too but same result im afraid.
Hi @StretchFredrik,
Can you try this in a compose before the apply to each loop?
triggerBody()['$formdata'][0]['value']
Can you add a Compose inside your Apply to each and just before your Condition. Then add the Current Item into the Compose and run the flow to look at the output. It should show an object with the key/value properties.
If it does, then go back to design view (edit mode) and hover over the Current Item field. This will show you what you need to use followed by ?['value']. This is definitely what you should be using in this instance.
Note that you won't have the name Apply_to_each as you're has a different name.
I'm afraid its still the same because it cant even loop since the $formdata object is null even tho there is data according to the triggeroutput.
Right now i loop the $formdata like this:
@{triggerBody()?['body']?['$formdata']}
and the object looks like this:
@Expiscornovus your expression got me the text, thanks!
But im still wondering why it doesnt allow me to loop it because $formdata is null, when obviously there is data since your expression got me it.
I believe your input for the Apply to each should be the following. Without the ['body'] since you're already using triggerBody.
@{triggerBody()?['$formdata']}
If you were using triggerOutputs then it would likely be:
@{triggerOutputs()?['body']?['$formdata']}
You are correct, i feel so stupid 😃
Power Automate defaulted into giving me body twice when it applied the loop.
Thank you both @grantjenkins @Expiscornovus
User | Count |
---|---|
92 | |
45 | |
20 | |
19 | |
15 |
User | Count |
---|---|
136 | |
54 | |
43 | |
42 | |
31 |