Update based on field
- On the create request screen, clickto open the advanced settings.
- Under Write Mode, ensure 'Update' is selected.
- Under Update Based on Field, use the dropdown to select the field from your output table.
When you are running on multiple records, you should usually keep Update based on field set to 'None'. The output record's position in the Run on Multiple Records table/view will then be used to update it.
We can understand why we need this with an example. Let's say the existing data in our output view in Airtable is:
And the API response data (after being transformed from JSON) is:
After a run with the write mode set to Update and Update based on field set to 'None', the output view will be:
The issue here is that before we ran the request the first record in our output view was associated with the 'Orange Hat' item. Now the first record is being used for 'Blue T-Shirt' and the second is associated with 'Orange Hat'.
If we had linked other records to the first record, added comments or values in other fields, these will now be associated with the wrong item.
After a run with the Update Based on Field set to 'Item Id', the output table will be:
Perfect! Now the
Units soldvalues and
Item namefield values have been updated (although only the
Units soldvalues changed), by using the unique
Item Idfield to merge the records.
Data Fetcher will only look at the records in your output view, not the entire output table. So if you have filters applied to the output view that prevent it from finding a matching record, a duplicate record will be created.