cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SandraAkujobi
Post Partisan
Post Partisan

Flow intergration with power apps button

So I have been trying to associate a flow with a button on power apps;  employees email out their weekly entries to their respective manager. The thing is that their are several managers that will view and approve on  an individuals weekly timesheet.  So how to integrate a flow with a button, which could include the start and stop dates I want to process, then have the flow do a get items on the list to get all the entries which would be in bulks as I'm trying to gather weekly entries, Then use filters and loops to process the records and send the approvals.

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @SandraAkujobi ,

Based on the needs that you mentioned, I think the combination of PowerApps and Power Automate could achieve your needs.

 

If you want to pass the start and stop dates from canvas app to your flow, you must define these parameters (which you want to pass from canvas app to flow) within your flow using "Ask in PowerApps" dynamic content of PowerApps trigger button.

 

Then within your flow, you could use the passed start and stop dates value to filter these items from your data source (e.g. a SP List) through "Filter array" action.

 

I have made a test on my side, please take a try with the following workaround:

Flow's configuration as below:

2.JPG

 

3.JPG

Within the "Filter array" action, "From" field set to value dynamic content of the "Get items" action. click "Edit in advanced mode", type the following expression:

@and(greaterOrEquals(ticks(item()?['Created']), ticks(outputs('StartDate'))), lessOrEquals(ticks(item()?['Created']), ticks(outputs('EndDate'))))

After that, you could add a "Apply to each" action below the "Filter array" action to loop your following process.

 

App's configuration:

4.JPG

Add above flow connection into your app, then set the OnSelect property of the "Fire Flow" button to following:

'FlowName'.Run(StartDatePicker.SelectedDate, EndDatePicker.SelectedDate)

 

More details about firing a flow from a canvas app, please check the following article or video:

https://www.youtube.com/watch?v=1wl9AtxWdkg

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

 

Best regards,

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

1 REPLY 1
v-xida-msft
Community Support
Community Support

Hi @SandraAkujobi ,

Based on the needs that you mentioned, I think the combination of PowerApps and Power Automate could achieve your needs.

 

If you want to pass the start and stop dates from canvas app to your flow, you must define these parameters (which you want to pass from canvas app to flow) within your flow using "Ask in PowerApps" dynamic content of PowerApps trigger button.

 

Then within your flow, you could use the passed start and stop dates value to filter these items from your data source (e.g. a SP List) through "Filter array" action.

 

I have made a test on my side, please take a try with the following workaround:

Flow's configuration as below:

2.JPG

 

3.JPG

Within the "Filter array" action, "From" field set to value dynamic content of the "Get items" action. click "Edit in advanced mode", type the following expression:

@and(greaterOrEquals(ticks(item()?['Created']), ticks(outputs('StartDate'))), lessOrEquals(ticks(item()?['Created']), ticks(outputs('EndDate'))))

After that, you could add a "Apply to each" action below the "Filter array" action to loop your following process.

 

App's configuration:

4.JPG

Add above flow connection into your app, then set the OnSelect property of the "Fire Flow" button to following:

'FlowName'.Run(StartDatePicker.SelectedDate, EndDatePicker.SelectedDate)

 

More details about firing a flow from a canvas app, please check the following article or video:

https://www.youtube.com/watch?v=1wl9AtxWdkg

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

 

Best regards,

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

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

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

Community Call Conversations

Introducing the Community Calls Conversations

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

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,961)