Help

Launch form from script

Topic Labels: Extensions
368 4
cancel
Showing results for 
Search instead for 
Did you mean: 
Joffa
4 - Data Explorer
4 - Data Explorer

I am an experienced programmer, new to Airtable.

I have two tables, one a 'triage' table where some client information is entered. When the client passes certain criteria I want to add the client information with some additional fields to the 'client' table.

The first pass at doing this with a button that builds a url to a form connected to the client table does work.

There are two issues - the button can be pressed multiple times, adding the client more than once. Also if the user is in the Airtable app it launches the web version which is disconcerting.

I have experimented with a script that tests a two state Single Select field (changing it from "New" to "Added to Clients"). However I cannot see how to launch the form from the script. Is this possible?

 

4 Replies 4

Hmm, sorry I'm a bit confused.  When you say form, you mean like a form view like this, is that right?

Screenshot 2024-03-06 at 12.34.37 PM.png
If so, clicking the button more than once would open the form more than once, but wouldn't have any effect on the data until they submit it, right?  (Sorry, I'm definitely not understanding something!)

I assume this button exists as a button field in a table, and that you are not using an Interface, is that right?

Yes, I am referring to an AirTable Form exactly like that.

Yes, the data wouldn't be affected until they press Submit, but what is to prevent them from doing that? It would be more efficient to not show the form and to indicate in the record that the client has been triaged.

Yes the button exists as a button field in a table. I am not using an Interface.

Hopefully that has cleared up any confusion.

So the question is how do I open that form from the script which is run by clicking that button?

(I believe one way is to create an Extension which would have access to the window variable of the DOM - but that would launch a browser instead of keeping the process within the Airtable app)

Ahh got it.  Sorry, I can't think of a way to do that; hopefully someone else can assist!

Thanks for your time. I think I need to not worry about prefilling a form (as in a Form view), just ask the user for the additional input in the script then write the new record in the client table.