Sep 15, 2020 09:32 AM
Hi AirTable Geniuses!
I’m fairly new at this, but I’m hoping I could create a formula field that auto-generates an Amazon-friendly cell for each book record my old Homebase book inventory. Homebase allows for an infinite number of book binding descriptors, but the only ones on Amazon that work for my books are Hardcover, Paperback, and Miscellaneous. So my AirTable has two binding fields: HOMEBASE BINDING and AMAZON BINDING. The first will just be copied from my old database. I think the second, though, needs a formula that starts like this:
IF({HOMEBASE BINDING}=“Hardcover”,“Hardcover”,IF({HOMEBASE BINDING}=“Paperback”,“Paperback”,IF({HB BINDING}!=
This is where I get stuck. How can I tell my AirTable table that if HOMEBASE BINDING does not equal either “Hardcover” or “Paperback”, my AMAZON BINDING field should say “Miscellaneous”?
I’d be mighty grateful for some assistance with this one! It would mean not having to comb through 25,000 records. :slightly_smiling_face:
Solved! Go to Solution.
Sep 15, 2020 09:55 AM
Hi @Alba_Machado2,
Since you are only checking the value of one field over and over again here, you’ll find it much easier to make use of the SWITCH()
function instead. The SWITCH()
function lets you set a default value if none of the other matches are hits:
SWITCH(
{HOMEBASE BINDING},
"Hardcover", "Hardcover",
"Paperback", "Paperback",
"Miscellaneous"
)
Sep 15, 2020 09:53 AM
Hi @Alba_Machado2 - you can just do this:
IF( {HOMEBASE BINDING} = 'Hardcover', 'Hardcover', IF( {HOMEBASE BINDING} = 'Paperback', 'Paperback', 'Miscellaneous' ) )
The final option is shown if it is neither hardback or paperback
Sep 15, 2020 09:55 AM
Hi @Alba_Machado2,
Since you are only checking the value of one field over and over again here, you’ll find it much easier to make use of the SWITCH()
function instead. The SWITCH()
function lets you set a default value if none of the other matches are hits:
SWITCH(
{HOMEBASE BINDING},
"Hardcover", "Hardcover",
"Paperback", "Paperback",
"Miscellaneous"
)
Sep 15, 2020 09:55 AM
Oops… sorry @JonathanBowen. Your response didn’t show until I hit reply and my page updated.
Sep 15, 2020 09:56 AM
Yep, SWITCH probably better
Sep 15, 2020 09:56 AM
No problem :slightly_smiling_face: Think yours is the better solution!
Sep 15, 2020 09:56 AM
Perfect! Thanks so much, Jeremy and Jonathan! (Just realized there were two of you!) :green_heart: