cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
glewis40
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
v-xida-msft
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
v-xida-msft
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

Thank you so much! This worked!!

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,078)