Action button to open URL not url-encoding the ampersand in the accounts.name field

I have an Action Button defined in my Accounts module that queries my license system by Account Name.

concat("https://<myLicenseSystem>/NLU?input=", $name, " licenses")

However when I have a name like "Texas A&M" the ampersand is not URL encoded and leads to an error.

The URL it takes me to is: 

https://<myLicenseSystem>/NLU?input=Texas%20A&M%20University%20licenses

instead of:

https://<myLicenseSystem>/NLU?input=Texas%20A%26M%20University%20licenses

How do I get the Action button to url encode the ampersand?

Thanks,

FrancescaS

Parents
  • Hello Francesca, 

    Thanks for creating this. 
    I believe a good way is just to account for the possible ampersands and replace them on your formula. 
    Can you try if something like the formula bellow works for you? 

    concat("https://<myLicenseSystem>/NLU?input=", strReplace("&","%26",$name,false), " licenses")


    Keep us posted. 

    Cheers, 


    André 

  • That workaround works! Thank you  !

Reply Children