Escaping special characters in text formula field

Hi,
Does anyone know of a way to escape special characters in a text formula field? I am trying to add a customised web link into a text formula field in the format: https://www.formtool.com/form1?entry={“field1”:“data”,“field2”:“data2”,“field3”:“data3”}
I’m trying to pull “data” and data2 from Knack fields.
I can get the URL to work without the {}, but as soon as I add the { and } into the URL, the URL is appended with additional content. I’ve also tried %7B and %7D, as well as &#x7B and &#x7D, but these also do the same things.
this is how it outputs with the {} or %7B and %7D:
https://www.www.formtool.com/form1?entry={{“formatted_value”:“\“field1\”:\“data\”,\“field2\”:\“data2\”,\“field3\”:\“data3\””}}
(you can see it adds a formatted_value section, and also adds \ between values and data).

Any ideas how this could be addressed?

Hey @Luke1, I see the same thing you do when I tried. I’d suggest logging a ticket with the Knack team to see if they can fix that.

In the interim, I found that using the replace function seems to get rid of the formatted_value string, regardless of what string you want to replace:
For example, I replace '' with '' and it formats normally:

%7B"field_1": "replace({Email},'':,'')"%7D

Becomes:

{"field_1": "hello@stephenchapman.me"}

Not the cleanest workaround, but it seems to do the job!

Thank you @StephenChapman .
That’s working perfectly, and TBH, its certainly not the dirtiest workaround I have running.
Really appreciate the help on that one!
:+1:

1 Like