Replace/Substitute Multi Select Field Values with Values from Another Field
Hello! I am new to Airtable and have been chugging along until now lol. I have done hours of research and received advice from a few people but I am still very much stuck.
I have a multi select field and I am trying to write a formula that takes the options in that field and replaces/substitutes them with values from other fields.
So let’s say my multi select field contains the following values:
Buyer
Agent
Closing Attorney
Closing Attorney Assistant
I want a formula that looks at each value and replaces each one with an email address from a lookup field.
‘Buyer’ would be {Buyer Email}
‘Agent’ would be {Agent Email}
‘Closing Attorney’ would be {Closing Attorney Email}’
‘Closing Attorney Assistant’ would be {Closing Attorney Assistant Email}
The email addresses would need to have commas separating them.
And if there is no email address in any of the lookup fields it would just ignore it.
Please help!
Page 1 / 1
Hi Jess, I’ve put something together here for you that should do what you’re looking for
You can duplicate the base to view the formulas
The idea is we just use the following code for each email we need to display, replacing the variables where needed:
I used a REGEX_REPLACE to get rid of the trailing comma and you can remove that if you want
Hey Adam!
I am running into a couple snags.
The “Buyer” lookup field is multi select so when there is more than one buyer, it combines the email addresses with no comma. See image below.
For some reason it is adding the buyer emails in the CC field when the “Buyer” is not an option. See image below.
Any assistance you could give would be greatly appreciated!
Hey Adam!
I am running into a couple snags.
The “Buyer” lookup field is multi select so when there is more than one buyer, it combines the email addresses with no comma. See image below.
For some reason it is adding the buyer emails in the CC field when the “Buyer” is not an option. See image below.
Any assistance you could give would be greatly appreciated!
Weird! Could I get a screenshot of the field(s) that contain the data buyerone@email.combuyeringtwo@email.com please? That’ll help me figure out what’s going on
Ah, yeah, that’s because the formula just looks for the word Buyer. Since the CC (from Email Templates) field contains Buyer Agent etc, and thus the word Buyer, it fulfils the condition and shows the buyer emails
I think the only way around this would be to make the text we’re looking for unique, so we would have to change Buyer to something that wouldn’t be found in your other options, maybe Buyer Primary, Buyer Client or some such
Weird! Could I get a screenshot of the field(s) that contain the data buyerone@email.combuyeringtwo@email.com please? That’ll help me figure out what’s going on
Ah, yeah, that’s because the formula just looks for the word Buyer. Since the CC (from Email Templates) field contains Buyer Agent etc, and thus the word Buyer, it fulfils the condition and shows the buyer emails
I think the only way around this would be to make the text we’re looking for unique, so we would have to change Buyer to something that wouldn’t be found in your other options, maybe Buyer Primary, Buyer Client or some such
See below!
Is there any other way to tackle this one? It’s not as simple as renaming the Buyer field because this isn’t the only one that would display this behavior. I also have Lender / Lender Assistant, Closing Attorney / Closing Attorney Assistant, etc.
Thank you!!
See below!
Is there any other way to tackle this one? It’s not as simple as renaming the Buyer field because this isn’t the only one that would display this behavior. I also have Lender / Lender Assistant, Closing Attorney / Closing Attorney Assistant, etc.
Thank you!!
Hi Jess, thanks for the screenshots
For the missing comma thing, we’ll need to put an ARRAYJOIN() around the lookup field we’re displaying the emails from, so that it looks something like this:
ARRAYJOIN({Buyer Email (from Buyer)})
This should solve that issue I think
Ahh, understood. Hmm, we could modify the formula so that it looks like the following?
FIND(
"Buyer,", {Multi Select} & ","
),
I’ve made the updates to the base linked above as well
Hi Jess, thanks for the screenshots
For the missing comma thing, we’ll need to put an ARRAYJOIN() around the lookup field we’re displaying the emails from, so that it looks something like this:
ARRAYJOIN({Buyer Email (from Buyer)})
This should solve that issue I think
Ahh, understood. Hmm, we could modify the formula so that it looks like the following?
FIND(
"Buyer,", {Multi Select} & ","
),
I’ve made the updates to the base linked above as well
It’s all working beautifully!!! Thank you so much! You have no idea how much I appreciate your help. :hugs: