cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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
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
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (68,330)