cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sudosaurus
Post Prodigy
Post Prodigy

Getting Yes/No value into word document?

Hello,

 

I'm trying to get Yes/No value into a word document using the 'Populate a Microsoft Word Document' action.

I've tried this formula in Power Automate however even if the value is set to "Yes", in the word document it shows as "No":

if(equals(outputs('Get_item')?['SF01_ClientPrivacyYesNo'],true),'Yes','No')

The trigger in my workflow is 'For a Selected Item'.

 

Thanks,

1 ACCEPTED SOLUTION

Accepted Solutions

Using the initialize variable action, you will have to store the result of the expression 
then populate the template using the variable's output:

PopulateWord.png



Thanks and Regards,
Vikas K

View solution in original post

6 REPLIES 6
vikulkar
Community Support
Community Support

hi @sudosaurus ,

 

I tried to setup a similar flow (with same trigger) and used the same expression with a yes/no column but did not have any issue.

if(equals(outputs('Get_item')?['body/Employed'],true),'Yes','No')

vikulkar_0-1645313025979.png

 



Thanks and Regards,

Vikas K

sudosaurus
Post Prodigy
Post Prodigy

@vikulkar and it appeared in the word template correctly?

vikulkar
Community Support
Community Support

@sudosaurus , Yes
I would recommend using a variable and then try to populate the template.

 

 

sudosaurus
Post Prodigy
Post Prodigy

@vikulkar could you suggest a good way of doing this? I'm still quite new to variables.

 

Thanks

Using the initialize variable action, you will have to store the result of the expression 
then populate the template using the variable's output:

PopulateWord.png



Thanks and Regards,
Vikas K

sudosaurus
Post Prodigy
Post Prodigy

Thanks @vikulkar 

 

That did it!

 

Although just had to update my formula to this:

if(equals(outputs('Get_item')?['body/SF01_ClientAccessYesNo'],true),'Yes','No')

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (5,410)