cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
edgar3tres
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

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
AlanPs1
Resident Rockstar
Resident Rockstar

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!


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

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!


@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?

 

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

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
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.

Users online (2,985)