cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dompilione
Frequent Visitor

Taking output from SQL Get Rows and turning into individual Strings?

Hi all, I have established a connection from Power automate to our SQL database, and seemed to figure out how to get the rows I am looking for, but I cannot seem to take these rows and do anything with them. 

 

My goal is to build a Power Automate flow that, when passed a Job Number, goes and grabs all rows from the relevant table data and then updates the record in Dynamics. I have gotten as far as getting the rows of data from the database while passing the Job Number, but I cannot seem to figure out how to get the output into individual strings (which is what Dynamics Update a Record asks for)

 

I was able to turn the whole thing into a string using set variable, but again the goal is to grab multiple rows and turn them into strings, not just the whole thing. Any ideas on how to finish this?

3 REPLIES 3
dompilione
Frequent Visitor

To give a little more context, please see screenshot of my Flow. 

 

dompilione_0-1611670915336.png

 

 

And then here's the input and output into the Filter Array - Which is how I am trying to take this array and turn them into individual objects, to then be turned into strings and input into the Update Rows action in Dynamics

 

dompilione_1-1611670997869.png

 

Hi @dompilione 

 

Thanks for your posting.

 

According to your description, you would like to get data from SQL and copy to dynamic but get some problem.

 

If that’s the case, I recommend you add ‘update a record’ action outside of ‘apply to each 2’ then you will get individual object with no problem. Meanwhile, if you want to get string format of that object, you just need to string() function to switch it.

 

Using filter array, we can get an array with specific condition.

If we use apply to each, we can get separate object for one record of a list.

 

https://docs.microsoft.com/en-us/power-automate/apply-to-each

https://docs.microsoft.com/en-us/power-automate/data-operations

Reference guide for functions in expressions - Azure Logic Apps | Microsoft Docs

 

Best regards,

Anna

Hi, thank you for your response. I think I'm on the right track here thanks to help you have given me, but I have run into a wall here. I'm taking the JobNumber item from the row, and I'm trying to figure out how to just get the single output value of the JobNumber that's input but it just returns the same input? Here's how it is set up

 

dompilione_0-1611854865528.png

 

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,411)