cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Community Support
Community Support

Re: Creating a word document from powerapps based on choice

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

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: Creating a word document from powerapps based on choice

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

Highlighted
Helper III
Helper III

Re: Creating a word document from powerapps based on choice

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 !

Highlighted
Helper III
Helper III

Re: Creating a word document from powerapps based on choice

Any update on the below query? Thanks !!

Helpful resources

Announcements
FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Users online (8,770)