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

Trigger flow upon hitting Submit button in Powerapps

Hello Community,

 

I have a Powerapps form with a Submit button. The Submit button would trigger Flow, so when I create a new form entry and I hit Submit, it would trigger the approval flow. At the same time, the Submit button would write the details onto a SharePoint list.

 

I have a SharePoint with 8 items in. I submit the Powerapps form to create item 9, triggered flow and details are written onto SharePoint list. I only want to get an approval email regarding item 9, however flow has triggered approvals for items 1 to 8 all over again.

 

Below is an extract of my flow used. Please advise how I can trigger flow only for the item being submitted. Thank you.

 

3.PNG

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

 

Hi @elleeyl ,

 

In fact, you can directly use When an item is created as a trigger, which can monitor whether items are added to the list.

 

Then you can use Get item action to get the details of the item and create an Approval action.

 

Hope this makes sense.

 

Best Regards,

Community Support Team _ Barry
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

6 REPLIES 6
RobElliott
Super User
Super User

Hi @elleeyl, you need to be using the SharePoint Get item action, not Get items.

Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

v-bacao-msft
Community Support
Community Support

 

Hi @elleeyl ,

 

You should use Get item action instead of Get items action.

In addition, you need to pass the Item ID when configuring PowerApps, because the Get item action needs the ID to get the specified item.

Please check this online doc and for more details on PowerApps and Flow integration:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/using-logic-flows

 

Best Regards,

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

Hi @v-bacao-msft ,

 

I apologise but I need more help as I am new to PowerApps and Flow. How do I get the item ID pass from PowerApps to be passed to Flow? I have tried "Ask in PowerApps", but the flow failed. 

 

Thank you.

 

Hi @elleeyl ,

 

In fact, you can directly use When an item is created as a trigger, which can monitor whether items are added to the list.

 

Then you can use Get item action to get the details of the item and create an Approval action.

 

Hope this makes sense.

 

Best Regards,

Community Support Team _ Barry
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

Hi @v-bacao-msft ,

 

Thanks for your advice, but I cannot trigger when an item is created. I have 2 SP lists for an expense report - Header and Details. 

Header contains report header information, and Details contains information of individual expense items.

The process is that user would submit Header information first, navigate to the next screen to submit individual expense items details to Details. The Submit button which I am using to trigger Flow would patch total expenses amount back to Header, and also create the approval flow.

 

If I were to trigger based on new item creation, the expense report would be incomplete. Hope this clarifies. 

I worked out an alternative based on your suggestion, i.e. trigger when a column is not null. Thank you!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,082)