Jump to content

Nickname in quotation marks


Recommended Posts

In addition to the standard 'first name' and 'last name' fields on my submission form, I have also included a 'nickname' option.  Currently on my results form I have a configured field set up with this formula:  [@field:First_Name] + SPACE(1) + CHAR(34) + [@field:Nickname] + CHAR(34) + SPACE(1) + [@field:Last_Name] and it works brilliantly when there is a nickname.  However, if there isn't then I get a weird result that looks something like this:  Jane "" Doe

Long question short, how do i get the quotation marks to only show up when there is something actually in the nickname field (checking the box 'hide if blank' doesn't work, I still get the weird quotations side by side between the first and last name.  

I'm open to suggestions.  Thanks in advance for your help. - Juliette

Link to comment
Share on other sites

7 hours ago, jblythe8121 said:

In addition to the standard 'first name' and 'last name' fields on my submission form, I have also included a 'nickname' option.  Currently on my results form I have a configured field set up with this formula:  [@field:First_Name] + SPACE(1) + CHAR(34) + [@field:Nickname] + CHAR(34) + SPACE(1) + [@field:Last_Name] and it works brilliantly when there is a nickname.  However, if there isn't then I get a weird result that looks something like this:  Jane "" Doe

Long question short, how do i get the quotation marks to only show up when there is something actually in the nickname field (checking the box 'hide if blank' doesn't work, I still get the weird quotations side by side between the first and last name.  

I'm open to suggestions.  Thanks in advance for your help. - Juliette

Hi Juliette,

As far as I understand you use calculated field. You may use CASE statement and check if the nickname has value. 

CASE 

WHEN Len([@field:Nickname])>1 
Then '[@field:First_Name]' + SPACE(1) + CHAR(34) + '[@field:Nickname]' + CHAR(34) + SPACE(1) + '[@field:Last_Name]'

ELSE '[@field:First_Name]' + SPACE(1) +  '[@field:Last_Name]'

END

 

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.

Guest
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.

Loading...
×
×
  • Create New...