Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

How to pass arguments from interface to automation script?

259 5
cancel
Showing results for 
Search instead for 
Did you mean: 

What I want to do is to collect some data from an Interface, and then pass that data to an Automation script. I do not understand how to do this. My current state is as follows:

- I have written the Automation script. For testing purposes, I have created some inputs under Configuration, and this is all working correctly. The script gets those inputs via input.config()

- I have created the Interface, with two record pickers and a button.

I would like to connect the Interface and the Automation script by running the script, passing as inputs, the values from the Interface's record pickers. How do I do this?

5 Replies 5

The script's parameters... a few situations that Selenium test automation could manage with the JavaScriptExecutor Interface.

Thank you, but I don't understand this response. What are Selenium and the JavaScript Executor interface? I am not interested in test automation, the problem is to connect the interface and automation script in production.

You cannot use interface record pickers as inputs to the script. You must use linked record fields for the inputs. 

Set up the input variables on the left side of the automation script editor. Create input variables with names that match the names you use with input.config() and set the values from the triggering record. 

Thank you for that response. I do not quite see how to map your suggestions to my application.

The interface has two record pickers (for tables Event and Session), and a third element, for selecting a date. The interface also has a button.

The automation's trigger is "When a button is clicked". The triggered script It has input variables named session, event, and date.

In your response, you wrote "set the value from the triggering record". So my questions are: 1) How do I set the values so that they show up in the script's input.config()? And 2) Does this work if the trigger is a button press, not the creation of a record?

The reason that I don't have the interface create a new record is that I need to validate the inputs before creating it. The automation script does that validation.

You cannot use interface record pickers as inputs to the script. You must use linked record fields for the inputs.

Suppose I have a Employee table, with a field named dept. This field is linked to the Department table. In my interface, I use a record picker to select an Employee record. I think you are saying that I cannot pass this Employee to the script, but I can pass the linked Department in that selected Employee. Do I understand correctly?

Set up the input variables on the left side of the automation script editor. Create input variables with names that match the names you use with input.config() and set the values from the triggering record.

How do I set the values from the triggering record?

Continuing my example: The interface has an Employee record picker. I want to pass an Employee's linked Department to the script.

I still do not understand how to cause the script's input variable to be bound to the Department in the selected Employee record.