With the Airtable module you can:
Read Table Data into WayScript
Delete Table Rows
Create New Table Rows
Update a Row
Follow the instructions below for setting up each of these form inputs.
In this example, we are using the "Event Marketing" base. Click on the base.
Choose the table you want to work with in the "Table Name" input. (In this case, the "Events" table.)
Choose whether you would like to Get Records, Delete Rows, or Create a New Record.
The "Get Records" option allows you to retrieve data from a table.
You can choose whether you want to retrieve All Rows, rows that match a Filter, or a Single Row.
If you choose the "Filter" or "Single Row" option, you will need to define the filter you want to match on.
All rows matching your settings above will display in the "Inputs" section.
Click the "Refresh" button for the most up-to-date results.
The "Delete Rows" option works much in the same way as the "Get Records" option, but deletes any matching records instead of retrieving them.
You also have the option to Create a New Record.
If you choose this option, you can either:
Build the data you would like to create using WayScript
Input raw JSON
If you opt to build Data yourself, you will need to define each of the field values of the new row you wish to input into the table.
Raw JSON
If you opt to input raw JSON, you will need to select the WayScript variable that contains that JSON or Hardcoded JSON. Both of them need to be in the following forma (The same format as a Fields JSON output item in Get Records) :
PATCH - A PATCH request will only update the fields you specify, leaving the rest as they were
PUT - A PUT request will perform a destructive update and clear all unspecified cell values.
Build Data (Recommended)
Inputs:
Record ID - The ID of the Record you want to update. This can be retrieved using the Get Records mode.
Fields - This is where you put the Key and Value that you want to update. The Key is the name of the column, the value is the new value you want for that cell.
Input Raw JSON (Advanced)
This mode allows you to input your own JSON or Struct into Airtable. The json MUST fit this structure:
{'id' : '<INSERT_RECORD_ID>','fields' : { 'column name' : 'new value', }}
Success: Bool //This tells you if the row successfully updated
Each column of your table will be available to select as an output from the Airtable module.