Jump to content

If then statement

Recommended Posts

Does anyone know how to write a script that says if the lastname in a cell is there then return the firstname and lastname else return nothing? Basically the data is not great and some cells are empty in the lastname and they want to use both cells when applicable but dont' want the firstname without the lastname. Sorry if I didn't explain it well, novice user!


thanks, Rick


PS I tried searching the forum but didn't seem to find the right JS?

Link to comment
Share on other sites

this should work....create a name rule, then insert into text editor...(hopefully all firstname fields are populated)


if (trim(field("yourLastNameField"))=="")

return ""


return field("yourFirstNameField")+" "+field("yourLastNameField")

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...