0

Open URL button w/URL parameters (ninox replacing characters)

Hello, Ninoxians! I am trying to create a button that will open a URL and pass parameters into that URL from my record; however, Ninox is replacing parts of the URL with different characters. Ninox is replacing

{ with %7B

with %25

with %7D

Note: I've added a space to URLs so that they do not get flagged for review.

My code:
let URLFirstName := replace('First Name'," ", "%20");

let PhoneNoLParenth := replace(Phone, "(", null);
let PhoneNoLRParenth := replace(PhoneNoLParenth, ")", null);
let PhoneNoSpace := replace(PhoneNoLRParenth, " ", null);
let UnformattedPhone := replace(PhoneNoSpace, "-", null);
let TextURL := "https:// www.example .com/Doorstep1/TextMessageSender?entry={%22CustomerPhone%22:%22" +
    UnformattedPhone +
    "%22&{%22CustomerFirstName%22:%22" +
    'URLFirstName' +
    "%22}";
openURL(TextURL)

Input:

Phone: (123) 456-7890

First Name: John

Expected result: 

https:// www.example. com/Doorstep1/TextMessageSender?entry={%22CustomerPhone%22:%22 1234567890%22&{%22CustomerFirstName%22:%22John%22}

Returned Result:

https:// www.example .com/Doorstep1/TextMessageSender?entry=%7B%2522CustomerPhone%2522:%2522 1234567890%2522&%7B%2522CustomerFirstName%2522:%2522John%2522%7D

 

Does anyone know how to get around this?

 

^I added a space above to each URL so that the post didn't need to wait for approval.

2 replies

null
    • Ninox partner
    • RoSoft_Steven.1
    • 3 mths ago
    • Reported - view

    Did you try the urlEncode() or the urlDecode() function?

      • Sam_Villano
      • 3 mths ago
      • Reported - view

       The issue that I'm running into is that one of the characters I'm trying to encode using that method is the double quotation mark " which equals %22

Content aside

  • 3 mths agoLast active
  • 2Replies
  • 40Views
  • 2 Following