Anyone been able to get a clickable link to work w...
# general
r
Anyone been able to get a clickable link to work where the URL is entirely contained in a custom field? The formula I'm using is '<a href={my_custom_field_containing_only_the_url}'||' target=_blank>Link</a>'. I tried putting google.com in there where my custom field is and it worked fine, so I know it's not that Disable HTML setting or that NS is blocking external sites. I get this when I click the link. It's like the URL isn't being evaulated since that's the name of my field. Anyone able to get around this?
r
Are you using the Formula (HTML) results field type?
r
yup
First I tried to just do Formula(HTML) with only the custom field tag as the 'formula' thinking that should work since the custom field value is a URL. But it just displays it as text even though the custom field type is also Hyperlink.
Store Value is checked on the custom field too, it's not "building" the URL.
r
Hey @RJMNS I have a custom field with a link that works. I’ll share screenshots
It’s an “inline html” field
‘<a href=https://www.google.com target=_blank>Google</a>’
Can also use this for building links to pages inside of your NetSuite account
Let me know if this works for you
r
Thanks @Ryan Longenecker, but I'm actually using it on a saved search. I did try that way, which is slightly different than what I was using, but I still got Invalid Expression.
r
It should work in the search formula also. Let me try mine and get back to you. Are you trying to link to google or internal NetSuite page?
r
I did Google just as a test to see if my HTML was wrong somehow, but the URL is in a custom field as you can see from the screenshot. Based on the error I'm getting when I click the link (when the link works...I've tried variations where the link "works" in a sense it attempts to go to a webpage and others where I got "invalid expression."), it seems like the URL is not filling in from the custom field tag.
r
Hey @RJMNS if you use “formula (HTML)” then paste in - ‘<a href=https://www.google.com target=_blank>Google</a>’ into the formula column. This should work and label it google. Let me know if this works
d
Try this for your Formula(HTML) : '<a href="' || {my_custom_field_containing_only_the_url} || '" target=_blank>Link</a>'
r
That did it @Dan Curtis TYSM! Of course it had to be some weirdness with quotes. I would not have guessed triple quotes.
d
No problem. I tried to build a link out similar to how you did (without any quotes) and had issues. Concatenating the "chunks" got me there. Glad it worked for you too.