cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Thuberdeau
Frequent Visitor

Time stamp wont reset after form submit

I am having issues clearing date fields (5 of them) in my App. The fields are populated with buttons.

 

Button formula: UpdateContext({DateNow2: Text(Now(),"[$-en-US]hh:mm:ss AM/PM")})

Text Field Formula: If(IsBlank(DateNow), ThisItem.'Stop Time', DateNow)

 

I have done the following to try to reset the fields after submit without success:

- Field "reset" property set to true

- Submit button formula: SubmitForm(EditForm1);ResetForm(EditForm1);Back()

- Form OnSuccess: ResetForm(EditForm1)

 

Any ideas?

Txs

1 ACCEPTED SOLUTION

Accepted Solutions
v-yutliu-msft
Community Support
Community Support

Hi @Thuberdeau ,

The reason why you met this problem is that :

the variable is populated by clicking the button.

If you just reset the form, but not click the button, the variable will not update with new time stamp.

I suggest you set the submit button have formulas of setting variable too.

For example:

SubmitForm(EditForm1);ResetForm(EditForm1);Back();UpdateContext({DateNow2: Text(Now(),"[$-en-US]hh:mm:ss AM/PM")})

Then when you submit the form, the variable will also update with new time stamp.

 

 

Best regards,

Community Support Team _ Phoebe Liu
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-yutliu-msft
Community Support
Community Support

Hi @Thuberdeau ,

The reason why you met this problem is that :

the variable is populated by clicking the button.

If you just reset the form, but not click the button, the variable will not update with new time stamp.

I suggest you set the submit button have formulas of setting variable too.

For example:

SubmitForm(EditForm1);ResetForm(EditForm1);Back();UpdateContext({DateNow2: Text(Now(),"[$-en-US]hh:mm:ss AM/PM")})

Then when you submit the form, the variable will also update with new time stamp.

 

 

Best regards,

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

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 (3,515)