cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

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
Community Support

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
Community Support

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

Highlighted

Thank you so much! This worked!!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,441)