Reset field from form when clicking cancel

Hi guys,

I have an inventory management app that progresses our products through stages of completion. An initial stage requires a mechanic to say "Yep, i've done that thing" by clicking a button. This progresses the product to the quality control stage, administered by the head mechanic.

Using actions I've grouped this so when the mechanic clicks the button it triggers a field update (Goes from blank to "Yep, i've done that thing") and then opens a form with the data to complete further details ("Here's all the things i've done to make this happen").

Our mechanics have managed to break this, which is great. I'm hoping this is down to my design and not a inherent flaw in Appsheet - someone clicked 'cancel' instead of 'save' on the form.

Now this product is stuck in a weird limbo where the field progressing it to quality control is completed with "Yep, I've done that thing" but there are no details filled showing it was done.

Is there a way of setting up the 'cancel' button on this form to reset the "Yep, I've done that thing" field?

Grouped action below:

dhdevans_0-1685530816714.png

Button action trigger:

dhdevans_1-1685530837037.png

Edit form action triggered:

dhdevans_2-1685530851455.png

 

Solved Solved
0 5 322
2 ACCEPTED SOLUTIONS

Such configuration will depend on the exact workflow desired. You may want to evaluate the following workflow, if it fits in your requirement.

You could have a LINKTOFORM() action that prefills in the field "Yep, i've done that thing" and there is some other required field in the form.  This will ensure that if the user comes out by canceling the form, even the field "Yep, i've done that thing" is not populated. The user could initiate this action instead of the current group action.

There could be some ways such as marking such record in red in say summary view with format rules till the user completes and saves the form with "Yep, i've done that thing" field populated. The record in red will continue to convey the user that she/he needs to complete and save the form.

Related sample app of LINKTOFORM() action.

Linktoform Example - AppSheet

 

View solution in original post

It didn't, and i struggled to work LINKTOFORM() but the concept of the workflow made me rethink the process.

1. When the mechanic clicks the button it opens the form. 

2. If the mechanic saves the form (which is a ref view) the 'behaviour' of the view is now modified to run the action "Yep, i've done that thing".

3. If they click cancel, nothing happens.

knew it would be a simple solution:

dhdevans_0-1685976928039.png

 

View solution in original post

5 REPLIES 5

Such configuration will depend on the exact workflow desired. You may want to evaluate the following workflow, if it fits in your requirement.

You could have a LINKTOFORM() action that prefills in the field "Yep, i've done that thing" and there is some other required field in the form.  This will ensure that if the user comes out by canceling the form, even the field "Yep, i've done that thing" is not populated. The user could initiate this action instead of the current group action.

There could be some ways such as marking such record in red in say summary view with format rules till the user completes and saves the form with "Yep, i've done that thing" field populated. The record in red will continue to convey the user that she/he needs to complete and save the form.

Related sample app of LINKTOFORM() action.

Linktoform Example - AppSheet

 

Suvrutt, that's so simple - I feel a bit of a dunce not having thought of it!

So, in summary, instead of a set of grouped actions triggering a field update then opening a form (essentially horse before the cart) I get the button to open the form and then update the field on save...

I'm going to need more coffee today i think!


@dhdevans wrote:

So, in summary, instead of a set of grouped actions triggering a field update then opening a form (essentially horse before the cart) I get the button to open the form and then update the field on save...


You are correct. Hope it works for you.

 

It didn't, and i struggled to work LINKTOFORM() but the concept of the workflow made me rethink the process.

1. When the mechanic clicks the button it opens the form. 

2. If the mechanic saves the form (which is a ref view) the 'behaviour' of the view is now modified to run the action "Yep, i've done that thing".

3. If they click cancel, nothing happens.

knew it would be a simple solution:

dhdevans_0-1685976928039.png

 

Thank you for the update. Nice to know you solved it yet another way.

Well , the concept was basically  not to allow the field "Yep, i've done that thing" to be saved before rest of the form.

One possible way was to club it along with rest of the form with LINKTOFORM() option or the other was  to do it afterwards after the form save as an event action. 

Nice to know that you implemented the second option. I believe that much tailor making will be required based on actual configuration of the app of which you are the best judge. 

Top Labels in this Space