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
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (47,234)