Oct 02, 2022 11:29 AM
Hello,
I am new to using Airtable.
I have a question about a formula I want to implement.
I would like to be able to do an IF function to check if a phone number is already assigned to the customer. If the phone number is assigned to customer 1, I would like to check if it is also assigned to customer 2, if so, a final check of the phone number for customer 3.
If the first condition is not validated, I would like to indicate “Customer1” in the result column, if the phone is assigned for “Customer1” but not for customer2, I would like the result column to indicate “Customer2” etc…
If the number is not in the list, and it is not assigned to any customer, I would like the result to be “Not assigned”.
The purpose of this formula is to check to which customer a phone number has already been assigned (knowing that it can be assigned to several customers).
This formula would be used during an API connection to check for a defined phone number and assign it to a customer who does not already have that phone number in his database.
If you have any idea about that, you would be a great help to me!
Thank you
Oct 02, 2022 11:17 PM
Hm so each record contains the phone numbers of 3 customers?
Oct 03, 2022 11:19 AM
Hello,
The first question is how your base would be designed to track this information. From your description I am thinking you would have two tables: PhoneNumbers and Customers.
The PhoneNumbers table would include 3 columns (customer1, customer2, customer3) that each Link to a single value from the Customers table.
You could then create a formula column using nested IF formulas like this:
IF({Customer1},
IF({CUSTOMER2},
IF({CUSTOMER3},
"Fully Assigned",
"Customer3"),
"Customer2"),
"Customer1"
)
The resulting behaviors would look like this