How to remove specific text from a field to create a new variable in globiflow
I'm wondering how to remove "////DRIVING////" from a text field that has a person's name in it. Don't know too much about coding.
-
Hi Daniel,
with calculation fields you can do awesome things - but you can't remove something from another field. You would need the extension Globiflow.. With calculations you can show something from other fields like from your text field. If you enter:
@text field.replace("////DRIVING////","")
in a calculation it shows the text w/o ////DRIVING//// - but the text in the text field doesn't change.
Rainer
-
I have a follow up question. How would I take the spaces from an address token in globiflow and turn them into "+"
i.e. 123 Main St --> 123+Main+St
Also, would it be possible to split one text field containing the name into first name, last name and middle name variables in globiflow?
Thanks so much,
Daniel -
Splitting a full name into First, Middle, and Last is tough to do with 100% accuracy given the differences across cultures about what first names, middle names, and last names (surnames) actually are.
You could do this in a crude way by looking for spaces in a full name field and making some assumptions--e.g. anything from position 0 in the full name string to the first space is first name. If there is only 1 space in a full name, then you might assume that the substring after the first space is the last name.
But there are a whole lot of reasons where this won't be accurate. And the source of your data needs to be consistent.
Examples: imagine a person named Juan Carlos Smith-Sanchez. This person probably considers their first name to be "Juan Carlos" -- and they may prefer to be addressed as "Juan Carlos" and not "Juan."
"George Herbert Walker Bush" is another example. This person probably prefers to be addressed as "George" and not "George Herbert."
So the difference here is cultural.
There are free web services like nameapi.org that you could call from Remote Get actions in Globiflow that would be more accurate overall.
It all depends on how precise you want to be.
Please sign in to leave a comment.
Comments
7 comments