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

Preventing SharePoint List Item text from encoding

I've got a flow set up which get items from a SharePoint list and pushes them to an array, as such:

 

AS2021_0-1611682824097.png

 

I then filter this array against another array created from an Excel file in the same flow. The problem I am having is that the items in the array made from the SharePoint list are being encoded, for example & is changing into &. This doesn't happen with the array created from the Excel file, so when the two arrays are compared, these items are not matching up.

 

Is there any way to prevent this happening to the SharePoint items?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-litu-msft
Community Support
Community Support

Hi @AS2021,

 

& is HTML for "Start of a character reference".

& is the character reference for "An ampersand".

If the text comes from a rich text column, it will use "&" instead of "&".

As a workaround, you could use the replace() function to convert "&" to "&", for example:

replace(item()?['RichText'],'&','&')

Screenshot 2021-01-27 134053.jpg

 

Best Regards,
Community Support Team _ Lin Tu
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
v-litu-msft
Community Support
Community Support

Hi @AS2021,

 

& is HTML for "Start of a character reference".

& is the character reference for "An ampersand".

If the text comes from a rich text column, it will use "&" instead of "&".

As a workaround, you could use the replace() function to convert "&" to "&", for example:

replace(item()?['RichText'],'&','&')

Screenshot 2021-01-27 134053.jpg

 

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

Thank you for your suggestion. I've tried adding this step in but I'm getting the following error:

 

AS2021_7-1611745549079.png

 

Would it be possible convert the rich text once I've initially gotten the items from the SharePoint list but before I start adding the items to the array?

v-litu-msft
Community Support
Community Support

Hi @AS2021,

 

It seems that there are some items' rich text column is empty, you could use empty() function + condition action check if the column value has value.

If true, means there is no value, do nothing;

Or use replace() function process the character "&".

 

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

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,696)