cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Javopr
Regular Visitor

Logic App - Set Variable with incorrect value

Hi Team

 

I'm having some issues with Logic App, specifically it's returning an incorrect value.

 

All this actions are inside a foreach that contain an array. The issue is with the first set.  The next sets of the foreach are good

 

HTTP Action Output:

Javopr_0-1663801386428.png

A Parse JSON  receive the value from the HTTP 

Javopr_2-1663801681556.png

 Then I set "JobIDArray" string variable using Parse JSON output

Javopr_3-1663801722825.png

 Until now, everything is working good.

Then I set the "JobIDStr" string variable using the following value
       replace(replace(replace(variables('jobIDArray'), '"'''), '['''),']','')
instead of getting the correct value: a5961424-8514-4264-96d3-27889bd3f4ca

The variable get the incorrect value  d7319bb4-f471-4fe0-bdbd-7e75c604d7bd

Javopr_5-1663801769871.png

I notice that the incorrect value belongs to the next record on the "foreach" action

 

Has this problem happened to someone?

1 REPLY 1
Sundeep_Malik
Community Champion
Community Champion

Hey @Javopr 

Just a question, are you using concurrency?

Variables and concurrency don't work.

 

Also try the above in a compose, might help. Not sure.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (2,542)