cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
misc
Resolver II
Resolver II

Convert Powerapps/Sharepoint List Rich Text to Plain Text and add to Excel

I am trying to write a flow which allows a user to 'Download' an export of an incident report via a Powerapp.

 

I don't have premium so I'm having to make my template for the export in Excel rather than Word. I've managed to get this to work, but I have realised that a few of the columns it is transferring are in Rich Text and so when it's exported it comes up with all the code too.

 

Excuse the formatting - I'll make it pretty if I can get it to work!

reportrichtext.png

 

Is there a way for me to convert the data pulled from the SharePoint List into PlainText in the flow?

 

I don't really understand variables and I tried to make a 'String' one but it made no difference so either that's the wrong thing to do or I didn't do it correctly!

 

Thanks,

 

1 ACCEPTED SOLUTION

Accepted Solutions
misc
Resolver II
Resolver II

My colleague and I finally worked this out.

 

The flow looks like this:

fix.png

And then the output from the second 'Compose' (in this screenshot called IncidentDeets) is used in the 'add to table' in excel.

 

Substring expression for 'Compose' action:

substring(variables('IncidentDetails'),62)

Substring expression for 'IncidentDeets' action:

substring(outputs('Compose'),0,sub(length(outputs('Compose')),23))

 

This works because we know how many characters are before and after each string we want (eg. the <div/> bit) and it removes that from the output. 

 

The only small problem is that if you have used paragraphs it still comes out with the <p> etc. code within the text, but it's much more readable like this than it was otherwise. 

 

I hope this solution helps others in this situation!

View solution in original post

2 REPLIES 2
misc
Resolver II
Resolver II

Commenting to bump this thread as I'm still having this issue and it's put a stopper in this project. 

misc
Resolver II
Resolver II

My colleague and I finally worked this out.

 

The flow looks like this:

fix.png

And then the output from the second 'Compose' (in this screenshot called IncidentDeets) is used in the 'add to table' in excel.

 

Substring expression for 'Compose' action:

substring(variables('IncidentDetails'),62)

Substring expression for 'IncidentDeets' action:

substring(outputs('Compose'),0,sub(length(outputs('Compose')),23))

 

This works because we know how many characters are before and after each string we want (eg. the <div/> bit) and it removes that from the output. 

 

The only small problem is that if you have used paragraphs it still comes out with the <p> etc. code within the text, but it's much more readable like this than it was otherwise. 

 

I hope this solution helps others in this situation!

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Users online (1,000)