Showing results for 
Search instead for 
Did you mean: 

Extract elements from array and then update their fields using Logic Apps

I wish to grab the elements in the Feedbacks array:

and then update two fields within that ids array:







                        "ids": "1234"



                        "ids": "4567"





update this:


"id": "1234"




             "id": "change this"

              "status": "change this"




"id": "4567"




             "id": "change this"

              "status": "change this"






I believe I may have to do this, does this look correct please, is this the correct approach?

Create two local variables that will update status and id.

I am seeing that I cannot dynamically put in the 'FeatureID' on variable 2 though because it is globally above the CDS step.



Does this appear correct? Any suggestion is appreciated. Thank you






Community Support
Community Support



I might need a bit more background on this to comment properly.


First question, are you in proper Azure LogicApps for this or are you in Power Automate? They're very similar now but different enough that it could be a factor, many connectors behave differently and LogicApps tends to be more customizable. You may need to seek guidance from the appropriate forums if so.


You should just need to use a Filter Array step such as what is outlined here:


With your Feedbacks variable, assuming that is an Array type, you should be able to put that variable into a Filter Array and then you can pull specific information from it.


Another example of a similar approach:


For even more:


Let us know!



Thank you Patrick, I will check out all the links you provided. Also, I am in proper LogicApp, not Powerautomate. I am not sure which forum to post to?


Here is a bit more information that I posted:


I have two different containers:

Features container and Feedback container.




Features container looks like this: It has a FeaturesID and a Feedbacks array that contains ids.




Feedbacks container looks like this: It has a Features array that contains an id that points back to the Feature it belongs to






I wish to change/update the contents within the Features array that belong to the Feedback container.  The id within the Features array (which is in the Feedback container) point to the FeatureID that is in the Feature container.




In order to change/update the items within the Features array that is within the Feedback container, my approach was/is to:




To retrieve the Feedback ids where the state is "LinkRequested" and where the id is >15.

(This result tells me these are all the Feedbacks whose Features need to be placed into CRM)




This result gives me all the Feedback ids that point to the Features that need to be pushed to CRM. Then I must update their Features arrays 'ids' and 'state' with the new CRM id that was auto generated from CRM.







The output ids from this query are the ids that point to the FeatureID  (in the Feature container) that need to be pushed to CRM.



To do this, would I need to perform a second query on this output to retrieve the actual FeatureID records?





(I was not able to do this above. I am having difficulty with how to retrieve the actual record from the first query that looks like this:




And then once these Features documents are pushed into CRM, I need to go back to the Feedback container and update the Features array within them to reflect the new ID that CRM has given as well as change the state name. (I think I can do this by parsing the data and filling in the actual document dynamically?)





I will be working on this and any insight is greatly greatly appreciated.

Thank you

Helpful resources

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (3,788)