* (or at least, not always, and the current behavior is confusing as of March 2021) * XXX This is to improve DX, because Airtable automation developer experience is shitty, and they don't allow to run automation that are based on Inputs from the UI. * You can use a formula field with "RECORD_ID()" to know the internal Airtable record ids. * Must be a valid ID from the "bankOrderTableName" table. * For testing purpose, as fallback value when "iggerBankOrderId" is not set. * Fields to fetch from the MoneyOutBankOrder table (for the trigger bank order).Ĭonst bankOrderTableName = 'MoneyOutBankOrder' * 2) It updates the records contained in the field "bulkTransferSimpleOrders" of the trigger record and changes their "executionStatus" to "planned" * - MoneyOutBankOrder - Fetches the data of the record that has triggered the automation * 1) It fetches data from Airtable (using the Automation internal API) * It works in a 3-steps workflow, such as: * It updates several MoneyOutBankOrder records. * This script is used by an Airtable automation. It’s not so useful here because there is only one field being transformed, but when you have a more fields to transform, it’s quite a lifesaver. It basically converts the fields described in BANK_ORDER_FIELDS_TO_FETCH into a more usable data format, to avoid having to transform each data manually. The getRecordFieldValues is a helper (it takes more than half of the script’s size) and isn’t meant to be changed unless you want to add new use cases. We use a similar script (the same “base”) for all our automations. The script is fairly well documented, and uses best-practices for testing and debugging. It’s much more advanced than the above, and will also require tweaking the code to change the “Configuration” and the “Step 2” which defines what fields are updated. I’m posting the below code for those who would to see how we deal with “complicated”. And, depending on your workflow, it might be as simple as Update Multiple Records with Automation - #2 by CT3 answer, or something far more complicated. Unfortunately, as of today, there is no other choice than writing a script. It’s a shame that Airtable doesn’t support updating multiple records through a no-code configuration. This might be helpful if you want to look into that more. That’s a bit convoluted, but it’s your “no code” option. Then you could have a seperate automation looking for change in that lookup field, which would then check the box in the Emailed field. That should update the checkboxes in the Emailed field of all the records passed from step 2.įWIW, you could probably do a lookup where, if the records in step 2 are connected to the trigger in step 1 via a linked record field, your step 4 in this automation updates a checkbox field on the trigger record instead. "Emailed": true, //Replace Emailed with the field name of the checkbox field you want to update, if different. Let table = base.getTable("NAME OF TABLE STEP 2 RECORDS ARE IN") // Replace with your table name. Insert this as the code, replacing the name of the table from which the step 2 records come from : let records = nfig().step2Records //.step2Records must match the Name field of the input field. If you make “run script” your step 4 action, and then set an input variable named step2Records with the value of the record IDs from the records in step 2: You could use a script in step 4 to achieve what you want to do, though. You’re right-it doesn’t seem like the update record step accepts multiple records as input.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |