cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
glewis40
Level: Powered On

power apps asset checkout + ms flow

I am using the asset checkout template on powerapps. I have added an approval flow to the reserve button. This is the code for that button 

 

SubmitForm(ReserveForm);AssetFlownew.Run(ReserveForm.LastSubmit.ReservedByEmail,ReserveForm.LastSubmit.ProductId,DateTo.SelectedDate,DateFrom.SelectedDate)

 

This is my date picker "Dateto" DateFrom" screenshot 1

When my flow kicks off the approval e-mail shows the default date only not date selected from form. I have searched the internet for hours and can't find a fix. I thought .selected would be the selected date on the form. The section on my flow request from powerapps the information and that's where the DateTo.SelectedDate,DateFrom.SelectedDate section comes in. But again it just shows default date on the datepicker not the actual selected date. 

 

Any help would be appreciated. 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support Team
Community Support Team

Re: power apps asset checkout + ms flow

Hi @glewis40 ,

Do you mean that the selected date within the DatePicker control would be reset to the Default date when you pass the selected date from your app to your flow?

 

Based on the issue that you mentioned, I think this issue may be related to the SubmitForm(ReserveForm) formula within your app.

Actually, when the SubmitForm(ReserveForm) formula executes successfully, the ReserveForm (Edit form) would be reset, so the DateTo and DateFrom datepicker controls would be reset to default date value.

 

As an alternative solution, please consider modify your formula as below:

Set(DateToVar,  DateTo.SelectedDate);         /* <-- Store the selected date value within the two DatePicker controls into variables firstly */
Set(DateFromVar, DateFrom.SelectedDate);
SubmitForm(ReserveForm);
AssetFlownew.Run(
ReserveForm.LastSubmit.ReservedByEmail,
ReserveForm.LastSubmit.ProductId,
DateToVar,
DateFromVar
)

Please consider take a try with above solution, then check if the issue is solved.

 

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

2 REPLIES 2
Highlighted
Community Support Team
Community Support Team

Re: power apps asset checkout + ms flow

Hi @glewis40 ,

Do you mean that the selected date within the DatePicker control would be reset to the Default date when you pass the selected date from your app to your flow?

 

Based on the issue that you mentioned, I think this issue may be related to the SubmitForm(ReserveForm) formula within your app.

Actually, when the SubmitForm(ReserveForm) formula executes successfully, the ReserveForm (Edit form) would be reset, so the DateTo and DateFrom datepicker controls would be reset to default date value.

 

As an alternative solution, please consider modify your formula as below:

Set(DateToVar,  DateTo.SelectedDate);         /* <-- Store the selected date value within the two DatePicker controls into variables firstly */
Set(DateFromVar, DateFrom.SelectedDate);
SubmitForm(ReserveForm);
AssetFlownew.Run(
ReserveForm.LastSubmit.ReservedByEmail,
ReserveForm.LastSubmit.ProductId,
DateToVar,
DateFromVar
)

Please consider take a try with above solution, then check if the issue is solved.

 

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

glewis40
Level: Powered On

Re: power apps asset checkout + ms flow

Thank you so much! This worked!!

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,263)