cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

flow returns script from Sharepoint Choice

I want to generate an html email in which the body contains an html table, every one of the columns that are of the 'choice' type return this (they are multi, the rest of the email looks just fine. Is there a way to remove the extra text? just want to keep the values.

[{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":0,"Value":"NEO"}][{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":2,"Value":"EHR PHP"},{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":3,"Value":"EHR SQL"}][{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":2,"Value":"EHR PHP"},{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":3,"Value":"EHR SQL"}][{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":0,"Value":"NEO"},{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":1,"Value":"NEO SQL"}]

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Hi @cboy ,

 

Please try with the following code to get the return results:

concat(first(item()?['Mchoice'])?['value'],';',first(skip(item()?['MChoice'],1))?['value'])

I have configured the flow likes below, and the return results:

1.PNG2.PNG

 

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Highlighted
Helper III
Helper III

Try writing those values to an array variable first, and then using a Split expression on that variable inside the body of your email.

Highlighted
Community Support
Community Support

Hi @cboy ,

 

Please try with the following code to get the return results:

concat(first(item()?['Mchoice'])?['value'],';',first(skip(item()?['MChoice'],1))?['value'])

I have configured the flow likes below, and the return results:

1.PNG2.PNG

 

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

This worked perfectly and as expected, thanks!


@v-yamao-msft wrote:

Hi @cboy ,

 

Please try with the following code to get the return results:

concat(first(item()?['Mchoice'])?['value'],';',first(skip(item()?['MChoice'],1))?['value'])

I have configured the flow likes below, and the return results:

1.PNG2.PNG

 

 

Best regards,

Mabel

 


 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (9,795)