cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

How to give it a few seconds before it actually Resets Form?

Dear Community,

 

Whenever I submit the button on my Form I have ve set my OnSucces to  ;ResetForm .. But since I have a few command lines that sends mails to my EndUsers it resets my form too quick! So I would love to add a Timer that it delays a few seconds before it resets the actual form.

 

Anyone able to help me out here?

 

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: How to give it a few seconds before it actually Resets Form?

Hi @Fouad ,

Could you please share a bit more about the few commands you used to send email to your End users?

Do you reference values from your Edit form data card values within your send email formula?

 

If you want to delay few seconds before it resets the actual Edit form, I think the Timer control could achieve your needs. Please add a Timer control in your app, set the Duration property to following:

5000    /* <-- 5 seconds */

set the Start property of the Timer control to following:

IsStart

Set the OnTimerEnd property of the Timer control to following:

ResetForm(EditForm1);
Set(IsStart, false)

Set the Visible property of the Timer control to following:

false

 

Set the OnSuccess property of the Edit form to following:

Set(IsStart, true);
'Type your send email formula here ...'

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

 

In addition, I think it is not necessary to add a Timer control to achieve your needs. If you want to reference the data card values in your Edit form within your send email formula, I think the LastSubmit property of the Edit form could achieve your needs.

Within your send email formula, you could use the following formula to reference the values from the lastest submitted record:

EditForm1.LastSubmit.Column1
EditForm1.LastSubmit.Column2

...

 

Please 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

4 REPLIES 4
Highlighted
Helper II
Helper II

Re: How to give it a few seconds before it actually Resets Form?

Add a timer control, and then set a variable that resets the form when timer runs out. 

 

OnSucces = UpdateContext({StartTimer:true})

Start value of the timer = StartTimer

OnTimerEnd = ResetForm +++

Highlighted
Skilled Sharer
Skilled Sharer

Re: How to give it a few seconds before it actually Resets Form?

@Fouad 

I think timer would not be an good option to add here when form is submitted.

 

The best option is to create a full size rectange on top of request form and a form-loader gif image on it. Add both of in a group and visible only on some variable if true (varExitScreen).

 

Like- OnSubmit action button- UpdateContext({varExitScreen:true})

OnHidden Screen - UpdateContext({varExitScreen:false})

OnSucess- Navigate your screen to some other screen.

 

 

Highlighted
Community Support
Community Support

Re: How to give it a few seconds before it actually Resets Form?

Hi @Fouad ,

Could you please share a bit more about the few commands you used to send email to your End users?

Do you reference values from your Edit form data card values within your send email formula?

 

If you want to delay few seconds before it resets the actual Edit form, I think the Timer control could achieve your needs. Please add a Timer control in your app, set the Duration property to following:

5000    /* <-- 5 seconds */

set the Start property of the Timer control to following:

IsStart

Set the OnTimerEnd property of the Timer control to following:

ResetForm(EditForm1);
Set(IsStart, false)

Set the Visible property of the Timer control to following:

false

 

Set the OnSuccess property of the Edit form to following:

Set(IsStart, true);
'Type your send email formula here ...'

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

 

In addition, I think it is not necessary to add a Timer control to achieve your needs. If you want to reference the data card values in your Edit form within your send email formula, I think the LastSubmit property of the Edit form could achieve your needs.

Within your send email formula, you could use the following formula to reference the values from the lastest submitted record:

EditForm1.LastSubmit.Column1
EditForm1.LastSubmit.Column2

...

 

Please 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
Helper II
Helper II

Re: How to give it a few seconds before it actually Resets Form?

Just what I needed, perfect. Thanks!

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Kudoed Authors
Users online (7,664)