May 04, 2020 10:15 PM
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
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?
May 05, 2020 09:23 AM
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.
May 06, 2020 08:15 PM
Thanks Zollie,
I’m new to Javascript any suggestions for how to set up the script?
May 07, 2020 07:33 AM
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.