Hi,
I am trying to send an email with a table of a list of items which fall under a certain criteria, however I am having trouble extracting multi choice field values from the list. The sharepoint list field in question is a choice field (multi selection allowed). When I only use the default field dynamic content, it pulls the Azure Sharepoint reference (e.g. [{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":2,"Value":"Choice"}]
There is no option for dynamic content for only the value of this field. See attached screenshot:
Any help would be appreciated, thanks
Solved! Go to Solution.
Hi @LH47 :
Just a little modification:
Mark1:
item()?['Value']
Mark2:
null
Result:
Best Regards,
Bof
Do you want to get the dynamic content form the action ‘Filter array’?
The Point is using JSON. I’ve made a test for your reference:
1\My data source
2\My Flow
3\The Result
n addition, you can also directly call the value through this formula:
item()?[‘columnName’]
Best Regards,
Bof
Thanks for the reply, however mine doesn't seem to be working. When using the JSON method, the schema validation fails, and calling the value directly via the formula results in the output with all the Azure reference text.
Is there a similar formula which can reference the value of the field rather than the field itself?
Hi @LH47 :
If Dynamic content cannot display the parameters you want, you can use ‘Expression’.
Please try:
item()?['columnName']
Best Regards,
Bof
Thanks, that is the expression I tried, but the output is still this: [{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":2,"Value":"Choice"}]
Hi @LH47 :
I get it. You only need "Value" instead of "@odata.type" and "Id".
Because "ChoiceColumn" allows mutiple selection, the value of "ChoiceColumn" is an array. To get all the values of the value column, you need to traverse the entire list, and then use the select action to get the "Value" column of the ChoiceColumn.I'v made a test for your reference:
Reference Formula:
1\items('Apply_to_each')?['ChoiceColumn']
2\item()?['Value']
3\item()?['Title']
4\variables('choice')
Best Regards,
Bof
Hmmm...thanks, that seems to work, although the output is a bit messy. Any tips on how to get that output into a nice HTML table for email (e.g. without the "Value", brackets, etc)?
Hi @LH47 :
Just a little modification:
Mark1:
item()?['Value']
Mark2:
null
Result:
Best Regards,
Bof
Awesome, thanks so much 🙂
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
User | Count |
---|---|
40 | |
37 | |
36 | |
36 | |
28 |
User | Count |
---|---|
39 | |
39 | |
32 | |
30 | |
23 |