cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gazzo1967
Impactful Individual
Impactful Individual

Trigger a flow with a button to create word doc from sharepoint list item

Hi All

I have a powerapp that i am using with a patch function and a gallery to create a sharepoint list item that can be modified continuously. (This is based on Shane Youngs Patch function video)

The Save button saves the modifed record to sharepoint list item.

Then when the inputter is ready it can be emailled to a recipient. This is done using Powerapps to email the HTML.text that has been created on another screen.

 

Capture7.JPG

But.........

What i would rather do is trigger a flow on a button to send the specific sharepoint list item based on a unique number (in the Title column of sharepoint list in the image the 10301 number) which would send a word file to a sharepoint document library instead.

I don't want to use when item created as the sharepoint item is modified until the inputter is happy (its a formative assessment).

I also know i use create file . so in short what i want to do is this

  1. Click a button in the gallery item of the powerapp to trigger a flow when inputter is finished with the record
  2. send that specific list item (Title is a unique number) as a word doc file to sharepoint document library.

Hopefully i have explained this clearly lol

 

THanks in advance (hopefully)

Gary

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-yamao-msft
Community Support
Community Support

Hi @gazzo1967 ,

 

Do you want to trigger the flow with a PowerApps button and create a doc from SharePoint list item?

 

Please check if the following workaround will work for your scenario.

 

First, set up the flow likes below. We need to use action Populate a Word template to input required info into a Word template, then create a Word file in SharePoint library.

1.PNG

 

Second, on the app, add a Button control and needed field, set the button’s OnSelect property with the following code:

Patch(List33,Defaults(List33),{Title:TextInput1.Text,DueDate:DatePicker1.SelectedDate});'PowerApp->PopulateaMicrosoftWordtemplate'.Run(TextInput1.Text,DatePicker1.SelectedDate)

2.PNG

 

Please check the following blog for a reference:

https://www.dmcinfo.com/latest-thinking/blog/id/9838/overview-of-microsoft-flows-new-word-online-con...

 

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

7 REPLIES 7
rebeccas
Community Champion
Community Champion

I personally like the Word Document one. 

 

So your Flow would be triggered in PowerApps and the only variable you would really need to carry through is the ID of the item on your SPList. 

 

Then you would use the Get Item to get the SPList details on that item and the Create Word Document to get your layout. I typically then make that a PDF and then either email it or save it back to that item in my SPList as an attachment. 

gazzo1967
Impactful Individual
Impactful Individual

@rebeccas 

Hi

Thank you for the response (quick work 🙂

So would my first flow trigger be Power apps?

as i have never tried this before!

how would the 'click' of the button trigger the action?

Is this the run command? (never used it so dont know the syntax)

 

Sorry for questions as fairly new to flow but beginning to understand the logi ... i think lol

regards 

Gary

rebeccas
Community Champion
Community Champion

Here is a video I made that is doing a signature into a document. 

 

https://youtu.be/UdbNqQ1z_Ww

 

It is not a super great video (not my thing) and it is not exactly what you need but it does show you how to trigger a flow in PowerApps and carry a value to Flow and uses the Word doc in Flow. Check it out and then let me know if I can help you with addapting this to your need. 

v-yamao-msft
Community Support
Community Support

Hi @gazzo1967 ,

 

Do you want to trigger the flow with a PowerApps button and create a doc from SharePoint list item?

 

Please check if the following workaround will work for your scenario.

 

First, set up the flow likes below. We need to use action Populate a Word template to input required info into a Word template, then create a Word file in SharePoint library.

1.PNG

 

Second, on the app, add a Button control and needed field, set the button’s OnSelect property with the following code:

Patch(List33,Defaults(List33),{Title:TextInput1.Text,DueDate:DatePicker1.SelectedDate});'PowerApp->PopulateaMicrosoftWordtemplate'.Run(TextInput1.Text,DatePicker1.SelectedDate)

2.PNG

 

Please check the following blog for a reference:

https://www.dmcinfo.com/latest-thinking/blog/id/9838/overview-of-microsoft-flows-new-word-online-con...

 

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.
gazzo1967
Impactful Individual
Impactful Individual

@v-yamao-msft 

Thank you will try

Regards Gary

gazzo1967
Impactful Individual
Impactful Individual

@v-yamao-msft 

The only dynamic value i get offered for my template fields is 'ask in powerapps'

I dont get offered the field names

gazzo1967
Impactful Individual
Impactful Individual

@v-yamao-msft 

Worked it all out thank you 🙂

But one question how do i change the date format?

 

We are UK based but date format US

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.

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 (2,062)