Help

Re: Multiple actions from an IF statement OR copy/duplicate field

Solved
Jump to Solution
2073 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Scott_Callery
6 - Interface Innovator
6 - Interface Innovator

I have a field named Postcode Area which is type formula and has nested IF statements.
Is there any way to add a second action to an IF statement such as:
IF (A=B, (action 1 & action 2), action 3)

I would like to take the value that is returned from the IF statement and paste it into another field within the same table so that I can use it in another lookup.

If there’s no possible way to do that in the IF statement, is there another way to duplicate the value of Postcode Area into another field?

I have done this successfully with a script but I don’t know of a way to trigger the script when a form is submitted.

1 Solution

Accepted Solutions

In the Record field in Zapier, you want to select the Record ID from the first step so that it knows it will update this specific record. When a new record is added to Airtable, Zapier will change this value to the new record id.

Check it and let me know :slightly_smiling_face:

See Solution in Thread

8 Replies 8

Hi @Scott_Callery,

You can make that other Field a Formula that simply equals that 1st field.

But what is the reason you need the same value twice in the same table?

BR,
Mo

Hi @Mohamed_Swellam,

Thanks for getting back to me. I tried your suggestion before posting the question and it works but I’m unable to use this field…
Honestly, I think it is the fact that I am new to to Airtable and I probably haven’t setup the base in the most efficient way…

The reason I need the value twice is because the field Postcode Area is of type formula.
If I could also link this field to a different table, then there would be no problem.

Ah ok that is a good reason :grinning_face_with_big_eyes:

Well then you can use Zapier to input the data from the field Formula to the Linked Field. However, you will have to perform a search via zapier in the Postcode Area table to make sure that it exists and if it doesn’t exist to create it.

Alternatively, as per @JonathanBowen suggestion to me earlier, you could use a Google Sciprt with the Airtable API to automate the script running.

Scott_Callery
6 - Interface Innovator
6 - Interface Innovator

Thanks @Mohamed_Swellam.

Do you have experience with Zapier? I’ve been playing around with it today to get it to work but with no luck.

I’ve tried the following:
Trigger - in Airtable, when a new record is in my table
Find record - I’m struggling with how to find the newest record. My logic is, find the newest record and then take the value of Postcode Area field and update (copy/paste) to the linked field.
Update record - see above

Hi @Scott_Callery

You dont need the Find a record part, it will already find the new record since you have the Trigger set for new record, so it will only be 2 steps. Test the trigger so that it brings the data and you can use it.

Now go to the 2nd step which should be Update Record, go down till you find the field where the Postcode should be pasted, use Custom, look for the field where the postcode is, click on it, now you will find something like 1 Postcode pasted in this field, test the action and you will find that it is pasted where you want.

Hi @Mohamed_Swellam

Thanks for helping :slightly_smiling_face:

I tried that and I got it working for 1 record but first in Zapier, I had to specifically choose that record to update it. New records added to the table do not update. So I tried something else but it doesn’t work:

When setting up the Zap, in step 2, there are 3 required fields, Choose the base, Choose the Table and then Choose the record you wish to update. In this 3rd required field, I guess that I want to update the field which I want to copy the data to? At the moment of setting up the Zap, this field contains no data. This Zap should copy data from Postcode Area to Field 42.

2020-06-08 09_49_42-Window

Then as you mentioned, further down the page, I find the Field 42 field and select 1. Postcode Area to be inserted.

2020-06-08 09_57_16-Window

When I run this test, I get the error that “Required field “Record” (rowId) is missing.”

Am I missing something?

In the Record field in Zapier, you want to select the Record ID from the first step so that it knows it will update this specific record. When a new record is added to Airtable, Zapier will change this value to the new record id.

Check it and let me know :slightly_smiling_face:

Scott_Callery
6 - Interface Innovator
6 - Interface Innovator

@Mohamed_Swellam Super! that works perfectly, thanks so much for your help :v: