Help

Re: Help with multiple tags based on words in long text

727 1
cancel
Showing results for 
Search instead for 
Did you mean: 
UX_Design
4 - Data Explorer
4 - Data Explorer

I’m trying to automate going through and tagging customer responses (long text)

I have a list of words or phrases I want it automatically tag with another phrase
eg.
Find and tag the following words
“Specials” or “bargains” or “price” = Price,
“menu” or “search” or “find” “navigate” =Navigation

Done manually it looks like this
Screenshot_2020-05-05 Voice of Customer 16 2-22 2 20 - Airtable(1)

I think the code would be something like this
IF it contains “X” or “Y” or “Z” =Z, IF it contains “A” or “B” or “C” =A

I’m not sure if I can set this up using the IF formula because it may not contain any of the words or it may contain more than one. Any advice? Should I be using a script instead?

3 Replies 3
Zollie
10 - Mercury
10 - Mercury

I’d probably use the scripting block, but this is possible with both formulas and scripts. Formulas have the benefit of “always running” - Scripts need to be run via hitting a button. However, Scripting would make for a more dynamic solution.

If you use a formula, other than the IF logic, your primary function is FIND(). And you’d need to write a FIND function for each word or phrase you’re looking for. In other words, it’s not dynamic code. If you someday need to search for some other words or alter what text it produces as a result of those words, the code would need to be altered.

Whereas a good JavaScript implementation might ask the user running it what words to look for / respond with each time it is run. Meaning the code wouldn’t get frequently altered, but it requires action from the user.

Thanks Zollie,

I’m new to Javascript any suggestions for how to set up the script?

I’d checkout other posts tagged with the scripting block, or the work offered tags if you’d like to hire a developer. Otherwise, if you’d like to learn, I recommend starting with codecademy or similar free resources alongside any scripting block documentation Airtable provides.