Hi Everyone
I am trying to build a flow that creates an item for each selected item in a multi-lookup column. So if the product column has 5 items selected it will create 5 separate items. So far I have this working and i am storing the actual product being created in a normal single text field because flow doesnt support multi-lookup yet.
The problem is the value actually shows like this: {"Id":1,"Value":"Product1"}
Basically I would like to just keep the product which is in bold above. Any idea of how this can be done within the apply to each in flow?
If it helps, I am using Microsoft PowerApps SharePoint Form to capture the data.
Solved! Go to Solution.
Hi @aadilganie,
Could you please share a screenshot of your flow's configuration?
I agree with @Pieter_Veenstra's thought almost, if you want to store the Lookup value (such as, Product1) into a Single line of text type column, you could get the Lookup value dynamic content directly within your flow. I have made a test on my side and my flow's configuration as below:
The flow works successfully as below:
If you want to get the product value which in bold above json object that you mentioned within the "Apply to each" action in flow, please take a try with the following workaround:
Within "Compose" action, Inputs set to Current item dynamic content of "Apply to each" action. Within "Compose 2" action, Inputs field set to following formula:
outputs('Compose')?['Value']
Note: The ProductName column is a Lookup type column with multiple values in my SharePoint list.
The flow works successfully as below:
More details about the operators within expression, please check the following article:
Best regards,
Kris
you should be able to query the Value field like this
?["Value"]
A while back I wrote a post about querying json:
https://veenstra.me.uk/2018/02/04/microsoft-flow-http-calling-webservices-xml-vs-json/
You will find the query near the edn of the post.
Hi @aadilganie,
Could you please share a screenshot of your flow's configuration?
I agree with @Pieter_Veenstra's thought almost, if you want to store the Lookup value (such as, Product1) into a Single line of text type column, you could get the Lookup value dynamic content directly within your flow. I have made a test on my side and my flow's configuration as below:
The flow works successfully as below:
If you want to get the product value which in bold above json object that you mentioned within the "Apply to each" action in flow, please take a try with the following workaround:
Within "Compose" action, Inputs set to Current item dynamic content of "Apply to each" action. Within "Compose 2" action, Inputs field set to following formula:
outputs('Compose')?['Value']
Note: The ProductName column is a Lookup type column with multiple values in my SharePoint list.
The flow works successfully as below:
More details about the operators within expression, please check the following article:
Best regards,
Kris
Hi
Thank you so much, gonna try this out and get back to you. My flow at the moment was actually the same as your first screenshot gonna modify to make it similar to yours..
Thanks again to you @v-xida-msft & @Pieter_Veenstra
Hi @v-xida-msft
You were right, turns out I didnt need to complicate things for nothing the option was there to add the product value all along. I just assumed that you couldn't use it because it was a multi-select field. It seems you can use the multi select field but you can't actually set it yet.
Thanks for the help!!