Hi All,
I'm trying to get just the "Value" property of the "Current Item" within my "Apply to Each" condition. The Current Item actually contains several properties including "@odata.type", ID and Value. I'm looking for the code to just get the value of the string because dynamic content doesn't provide it. items('Apply_to_each') is the present code and need to drill down and get just the "Value" property.
Solved! Go to Solution.
Hi @IT_Matt
within apply to each
use expression item() - this will give you context to currently running item in the loop
so if Value is available withoin location loop
use item()?['Value'] - this should be used as an expression
Regards,
Reza Dorrani
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @IT_Matt I'm not quite sure why you would have an apply to each on this as you have just created a single file and got the details of that file, so I don't know what the apply to each is doing there. Am I missing something here (probably!) ?
Rob
Los Gallardos
Hi @IT_Matt
within apply to each
use expression item() - this will give you context to currently running item in the loop
so if Value is available withoin location loop
use item()?['Value'] - this should be used as an expression
Regards,
Reza Dorrani
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi Rob,
The reason for the "Apply to Each" is because the "Location" is a SPO column that has multi-selections. I need to use each selection as the destination folder name (library name).
So to start at the beginning I have a user uploading a file to a library and they add metadata under the location column by selecting the locations the file needs to go to. I have Flow looking at the selections in that location column to see which libraries the file will need to be copied to.
Hope this helps.
If using Power Automate Desktop this is an other syntax.
If using af SQL-execution step like this:
SELECT COUNT(*) Cutomers FROM CUSTTABLE
The you can set a variable step like this:
Set (Customers) To: %QueryResult[0]['Customers']%
You can also use a loop for this:
For Each (CurrentItem) in (QueryResult)
... Set variable (Customers) to: %CurrentItem['Customers']%
... Break Loop
End
Happy coding with Power Automate Desktop https://aka.ms/GetStarted-PAD
Hi Reza,
I'm new to this. I'm having a problem with my "apply to all " timing out. Attached are the screenshots.
Any help would be appreciated.
There are almost 2000 values in the IDs array, What I wish to do is, send the request where the URI has all the array values one by one as query parameter. And eventually, create a file in onedrive for the output data.