Clearing a data cell on button action

Great how to article on building a form from scratch at Build a Form from Scratch.
The 'Add' button works great to write back to a table, but there is no action on the screen to confirm an action took place.

Is it possible to take another action such as clearing the input field after form values have been written to the underlying table, or post a success/fail message on the form?

Thanks,
David

Hi @OCDavid :slight_smile: :honeybee:

Yes, you can clear an input field of a form with an automation that updates the input variable to ="" Which clears the field:

Select the Navigate automation step:

Then select the update current screen tab. Here's where you can update the variables on the screen:

For an idea of a confirmation of a submission, you can navigate to another screen with the message:

Here's another link that can give more ideas, which shows how to show or hide content boxes (say with a confirmation message) with conditional visibility: Add Conditional Visibility & Data Validation

Hope this helps! Let us know if you have any other questions. :honey_pot:

1 Like

Thanks for the great response Alyssa. I also looked at the conditional visibility topic. In my case, there is only 1 input value. The behavior was that the Add button would only become visible after leaving the field. Is there a way to toggle button visibility based on data entry (i.e. check if the data cell 'isblank()' after input of a character)?

1 Like

You're welcome, @OCDavid , I'm happy that helped :slight_smile:

And yes, if you look on the bottom of the article I provided, you'll see a section on how to make a button visible or not (by setting a formula in the Display tab of the properties): Add Conditional Visibility & Data Validation

Hi Alyssa. Yes, I followed the conditional visibility guidance. The preferred application behavior would be to have the 'Add' button become visible as soon as the first character is entered into the input field. I found that I had to tap outside the input field for the action to execute. Is there a way to execute an action on any character entry on an input field?

Thanks,
David

Hi @OCDavid :honeybee:

If you set up a field as a shared source to a particular table cell or column, you can create an automation in Tables that triggers when a change is made.

In builder, the field should be a shared source to a table location:

Now in tables, click on the automation tab in the left-hand panel to set an action for a specified column or cell change:

Hope this helps! :slight_smile: