Showing results for 
Search instead for 
Did you mean: 
Community Champion
Community Champion

Conditional Format of OUTPUT

I have an interesting issue I'm hoping you can help with. 


What I currently have (works fine) : 

  • PowerApp connected to a Sharepiont Custom List
  • Microsoft Flow that grabs each new record from SP list, creates a .doc, converts .doc to .pdf
  • Flow uploads .pdf to a SP Document Library

I need to conditionally format some of the items in the .pdf in red based on what is entered in the PowerApp



  • If user marks a question in the PowerApp with "Exceptions Taken", I need the final .pdf to turn that item red to attract the eyes of the person reading. 


Anyone know of a way to accomplish this somewhere in the PowerApp, on Sharepoint, or in the Flow? I'm thinking of a way to grab the .doc and apply conditional formatting there, but I dont' know how to go about it. 


Thank you

Community Support
Community Support

So here what you are trying to achieve is to modify the .PDF content wihtin PowerAppps or Microsoft Flow?

Based on what I know, currently there is no way to achieve that.


You may need to submit it as an idea through the following page:




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

No. I'm trying to conditionally format text somewhere in PowerApps, Sharepoint or Flow BEFORE the document becomes a PDF. 



Here is the workflow in more detail if it helps: 


  1. User fills out a form in PowerApps and submits it
  2. The completed form becomes a record in a Sharepoint list
  3. A Flow is set off which takes the content from the new Sharepoint record and
    1. Converts it to .doc format
    2. Runs it through a Word template I created
    3. Saves the new .doc to a Sharepoint Document Library
    4. Sends the .doc to OneDrive for Business and converts it to .pdf
    5. Saves the new .pdf to the same Sharepoint Document Library

What I need: 


  • If a user marks one of the options in the form with "Exceptions Taken" (aka "bad"), I want to somehow highlight it in red or otherwise bring attention to it when people view the final .pdf. 
  • This conditional formatting can occur anywhere in the above workflow, I just need help establishing WHERE in the workflow to make that happen. 
Not applicable

I guess you could tackle at a number of points, but It's dependant on what format you're storing your data.


Personally, when initially processing the form, I'd do my checks there and wrap any positively met conditions in a basic <font color="red"> my text here </font> tag.  


Write that into the SP list and see how that works when you're converting into word and then PDF.

Thank you for the response @Anonymous. Does this method then make the Sharepoint column a "calculated" column? If so, this causes issues with PowerApps. 

Not applicable

Ah yes, just had a play and I see what you mean.  Annoying 😞


Ok, so how about this.  For each condition that you're checking, add a new yes/no column in your SP list and on your form set these as visible:false  - and for the text value do your conditional checking there e.g. If(ThisItem.Title="Issue",1,0)


You'll then save this data too, recording that it's an issue (which can only be a good thing?)


Then when reading that data back and coming to write it, check the y/n value associated with the question and at that point use concatenate to wrap it in the font tag (assuming that the simple html tag will work!) before you write the data.


Good luck 🙂



Whew! That could work. There are ~40 form fields in this app. Not sure I want to double them up. Thanks for the lead though, I may be able to find a way to Patch things in. 


Please let me know if you think of another way. 


Take care

Not applicable

Interestingly, the calculated field I had in SP is actuually coming through, just not with the fieldname I expected...maybe that's a possible for you then?




Maybe try that?  


My calcuated field in SP had this formula to check the condiion :  if([text]="bbb","<font color='red'>"&[text]&"</font>",[text])

Helper III
Helper III

i feel like the easiest way to do this would be to generate the document in powerapps with an HTML text control and use if statements on the text color/fill html. example .HtmlText:


"<div align=center><table border=0 style=font-family:Arial, Helvetica, sans-serif;>"
&If(question1.Value="triggervalue","<font color=red>","<font color=black>")
&"Your text</font>"

i'm sure that html isn't perfect, but hopefully it gets the point across. then you can pass the control's HtmlText value directly to flow from powerapps to create and convert the .doc.

Helpful resources

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,603)