Removing a middle initial from a name field
Hi everyone,
I'm having trouble with something and was hoping you could help. I have a list of names that I need to format. All the names are in text fields. Some names have middle initials and others don't. What I need to do is format the list in a new field so that all the middle initials are removed. I have no idea how to do this unfortunately, and have searched and gotten nowhere. I have also asked podio support and haven't gotten too far. I was hoping someone here could help me with this.
I'm doing this because I am using a globiflow flow to match the names in the list to names in a leads app I have, and pulling mailing addresses from the item associated with the matched name to use for an automated contract I'm creating. But none of the names in the leads app have the middle initial in them. So I'm formatting the names in my list so that they'll match the names in the leads app.
I hope my question is clear and I appreciate the help tremendously. Thank you in advance!
Oz
-
Hi Oz! I am by no means an expert but since you said you are using globiflow, maybe you could leverage this parsing functionality?
http://www.globiflow.com/blog/parsing-text-in-podio-with-globiflow.php
-
Hi Oz,
in a calculation field you can do this:
var text = @your text field;
text.substring(0,text.indexOf(" ")) + " " + text.substring(text.lastIndexOf(" "))The code gets first the string before the first blank space and then the string after the last blank space. Works fine, if there's no prefix and no suffix in the name field. and if the first name doesn't be 2 strings like "Su Ann B. Miller" (result would be; "Su Miller")
Rainer
Please sign in to leave a comment.
Comments
3 comments