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

Dealing with Blank property fields in word document

Hi I wonder if anyone can help me with this conundrum.

 

I'm using flow to auto generate word documents based on an action from a sharepoint list.

I've built the document library, created the word template, added the additional columns and can generate the documents.

 

However I am stuck on one little piece in the puzzle. When i create the document, which is a letter, some people have a different number of fields in their address, i have columns Address1 to Address 5. When it generates a letter but the addressees address only has content in 4 out of the 5 fields it leaves the document property name [Address5] in grey in the document.

 

If there any way of sorting this? I've added in the developer tab in word to see if i could find a solution but i'm stuck!

 

many thanks in advance of a solution.

 

Emma

1 ACCEPTED SOLUTION

Accepted Solutions
AlanPs1
Resident Rockstar
Resident Rockstar

Hi @Emmaburt26 

 

If you post a picture of the JSON/Flow I could get your values but assuming your value is "variables('X')", the below will add a blank space if it is null and should then in turn remove the grey.

 

A bit of a hack I guess but one that could be worth a try:

 

if(equals(not(empty(variables('X'))), true), variables('X'), ' ')

Try replacing variables('X') with your input using this expression as where you see ' ', this adds a blank space if it is empty.

 

If you find my posts helpful, please mark with thumbs up

 

If this solves your issue, please click "Accept as Solution"

 

Any questions, just ask.

 

Thanks, Alan


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

Proud to be a Flownaut!


View solution in original post

3 REPLIES 3
AlanPs1
Resident Rockstar
Resident Rockstar

Hi @Emmaburt26 

 

If you post a picture of the JSON/Flow I could get your values but assuming your value is "variables('X')", the below will add a blank space if it is null and should then in turn remove the grey.

 

A bit of a hack I guess but one that could be worth a try:

 

if(equals(not(empty(variables('X'))), true), variables('X'), ' ')

Try replacing variables('X') with your input using this expression as where you see ' ', this adds a blank space if it is empty.

 

If you find my posts helpful, please mark with thumbs up

 

If this solves your issue, please click "Accept as Solution"

 

Any questions, just ask.

 

Thanks, Alan


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

Proud to be a Flownaut!


View solution in original post

@AlanPs1 you are a genius!!!

 

fixed it. thank you so much

 

Emma

No problem @Emmaburt26 

 

Thank you for feeding back and clarifying the resolution.

 

Best wishes

 

Alan


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

Proud to be a Flownaut!


Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Top Solution Authors
Users online (3,162)