cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Replacing {Text} with sharepoint list values

Hi,

 I have a HTML doc that will get converted into PDF, and there's something I can't figure out!

so the Html has

Date: {Date}

Name: {Name}

and I need to replace the fields that have {text} with the new created items on a sharepoint list, how can I do that?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Resident Rockstar
Resident Rockstar

Re: Replacing {Text} with sharepoint list values

Hi ...

I am not sure where you are getting {Date} from in the format. But you can do whatever you want, compose holds countless lines if you want it to. I have separated mine above with various html tags. This outputs an HTML file that I format and save to PDF.

Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


View solution in original post

6 REPLIES 6
Highlighted
Resident Rockstar
Resident Rockstar

Re: Replacing {Text} with sharepoint list values

Hi @edgar3tres 

I have hsd some success doing this from lists.

How are you generating the HTML, is it from within the Flow?

Can you post a pick of your Flow and some detail and we'll be beterr placed to advise.

 

Thanks, Alan


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Highlighted
Helper II
Helper II

Re: Replacing {Text} with sharepoint list values

So I have a HTML on a sharepoint folder, and I am replacing every single {Text} that i need indivually using a Compose action, and then it creates a new html with everything replaced, but is not ideal for a lot of data!

composecomposecreate new HTML and convert to PDFcreate new HTML and convert to PDFwhen Item is createdwhen Item is created

Highlighted
Resident Rockstar
Resident Rockstar

Re: Replacing {Text} with sharepoint list values

Hi @edgar3tres 

I am going to put a detailed post out on this next week, but below is a snip of how I go about it. yours does look similar.Capture-325.png

I add all my dynamic values to the composes.

They all look something like this:Capture-326.png

referencing image 1 I pull each compose in and place within a div. I have seperate compose at the top that I use to house all the CSS.

 

Does that help at all?

 

Thanks, Alan


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Highlighted
Helper II
Helper II

Re: Replacing {Text} with sharepoint list values

@AlanPs1 Can I do multiple lines in Compose?

Like this one below that I'm using to replace the fields

replace(body('Get_file_content_-_html'),'{Date}',body('Get_item_-_Balancing')?['Date'])

 

can I add more there? how do I separate them?

 

Highlighted
Resident Rockstar
Resident Rockstar

Re: Replacing {Text} with sharepoint list values

Hi ...

I am not sure where you are getting {Date} from in the format. But you can do whatever you want, compose holds countless lines if you want it to. I have separated mine above with various html tags. This outputs an HTML file that I format and save to PDF.

Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


View solution in original post

Highlighted
Helper I
Helper I

Re: Replacing {Text} with sharepoint list values

I have the same question and would also like an answer.

 

The question is, in a compose action, how can you do multiple replacments of tokens in your document. To try and be clear. I would prefer not to have a Compose action for every singe replace that i want to do. Can I just have a single compose action that does multiple token replacements?

 

if so, what is the syntax? Do i separate with a comma?

Thanks

Helpful resources

Announcements
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

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