Escape quotes in tokens {!field}

  • Thread starter Thread starter kbachtold
  • Start date Start date
Status
Not open for further replies.
K

kbachtold

Guest
We had an issue come up in development where we wanted to reference a token in a server-side script that has quote characters in it in a name template. So for example we wanted to do something like this: Name Template: #EVAL[{!flag} ? "{!thefield}" : "{!theotherfield}"] The problem is that tokens have their values literally dropped into the code exactly as they are. So if thefield has a value of This is a "test" value, the quotes in the middle mess up the formula: {!flag} ? "This is a "test" value" : "othervalue" The result is a broken formula. In trying to work around this issue, we thought about using a formula field instead, only to discover that formula fields are not supported in name templates. Thus we are literally unable to make this field a part of the name template because we can't reference it properly. There needs to be a way to escape quotes in a template token, something like {!thefield#escapequotes}.

Continue reading...
 
Status
Not open for further replies.
Back
Top