cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Santosh_M
Helper III
Helper III

Creating a word document from powerapps based on choice

Hi,

 

I am working on a process to create a word document using powerapps and flow. I am able to achieve the mapping now. As an extended requirement, we need to map the values to word doument, when users selects a specific value from dropdown field. 

As an example, we have 3 choices, A, B, C. We want to map the value to word document, only if A is selected and ignore if B or C is selected. 

 

Is it possible to achieve? Any help is appreciated.

 

Thanks,


Santhosh

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-yamao-msft
Community Support
Community Support

Hi @Santosh_M ,

 

Do you want to populate a value to word document if the dropdown selection is A, otherwise, leave it blank?

 

Please try with the following configuration.

 

First, set up the flow likes below.

 

Add a PowerApps button trigger, then the action Populate a Microsoft Word template. In the field that you want to populate the value, select the dynamic content Ask in PowerApps first, then replace it with the following code:

if(equals(triggerBody()['PopulateaMicrosoftWordtemplate_selection'],'A'),triggerBody()['PopulateaMicrosoftWordtemplate_selection'],'')

 

Then the action Create file to create the file with the content from the template.

1.PNG

 

Second, start an app, add a button and a dropdown control on the app.

 

Set the Dropdown control’s Items property as:

["A","B","C"]

 

Set the button’s OnSelect property as:

'PowerApp->PopulateaMicrosoftWordtemplate'.Run(Dropdown1.Selected.Value)

 

Then when the selection is A, value A will be populated into the word template, if the selection is B or C, the field will be blank.

2.PNG

 

Please try it on your side.

 

Best regards,

Mabel  

 

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

View solution in original post

4 REPLIES 4
v-yamao-msft
Community Support
Community Support

Hi @Santosh_M ,

 

Do you want to populate a value to word document if the dropdown selection is A, otherwise, leave it blank?

 

Please try with the following configuration.

 

First, set up the flow likes below.

 

Add a PowerApps button trigger, then the action Populate a Microsoft Word template. In the field that you want to populate the value, select the dynamic content Ask in PowerApps first, then replace it with the following code:

if(equals(triggerBody()['PopulateaMicrosoftWordtemplate_selection'],'A'),triggerBody()['PopulateaMicrosoftWordtemplate_selection'],'')

 

Then the action Create file to create the file with the content from the template.

1.PNG

 

Second, start an app, add a button and a dropdown control on the app.

 

Set the Dropdown control’s Items property as:

["A","B","C"]

 

Set the button’s OnSelect property as:

'PowerApp->PopulateaMicrosoftWordtemplate'.Run(Dropdown1.Selected.Value)

 

Then when the selection is A, value A will be populated into the word template, if the selection is B or C, the field will be blank.

2.PNG

 

Please try it on your side.

 

Best regards,

Mabel  

 

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

Thanks Mabel. This really helped me to address my issue. I just want to also know, if it is possible not to show up entire line. Like there is a parameter against which this value is mapped. And if we dont select A, i dont want to show the even parameter. Possible?

 

Thanks again !

Any update on the below query? Thanks !!

The Word Online Populate Template used to be a free module and now is premium.  Such a basic solution and a premium app seems ridiculous. 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Users online (1,159)