URL Encode question

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • Answered
I try creat one button to connect with some website to tracking shipping
http://elines.coscoshipping.com/NewEBWeb/public/cargoTracking/cargoTracking.xhtml?CARGO_TRACKING_NUMBER_TYPE=BILLOFLADING&CARGO_TRACKING_NUMBER=&REDIRECT=1&uid=

But the i need Encode the number atter "CARGO TRACKING NUMBER=" IT'S IN THE MIDDLE of the web, how can i  creat one FORMULA URL to do it ?
Photo of Liang xie

Liang xie

  • 170 Points 100 badge 2x thumb

Posted 1 year ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 53,240 Points 50k badge 2x thumb
Photo of Liang xie

Liang xie

  • 170 Points 100 badge 2x thumb
Photo of Liang xie

Liang xie

  • 170 Points 100 badge 2x thumb
The number did not encode the right place
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 53,240 Points 50k badge 2x thumb
Photo of Liang xie

Liang xie

  • 170 Points 100 badge 2x thumb
without last "REDIECT=1&UID="  The website does not show it correctly 
Photo of Liang xie

Liang xie

  • 170 Points 100 badge 2x thumb
and some web. need encode two numbers at two differnt place, it's also one question 
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 53,240 Points 50k badge 2x thumb
The problem is that the website will now allow you to do that.  Even if you paste in the URKL that you see after you do a search, it does not work.  So trying to replicate that URL will not be successful.

Try it. do a manual search and observe the URL.  Copy and paste it manually and you will see that it does not work
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 27,994 Points 20k badge 2x thumb
I am guessing this is the type of URL formula field you are looking for:
"http://elines.coscoshipping.com/NewEBWeb/public/cargoTracking/cargoTracking.xhtml"; &
"?CARGO_TRACKING_NUMBER_TYPE=" & URLEncode([BILLOFLADING]) &
"&CARGO_TRACKING_NUMBER=" & URLEncode([CARGO_TRACKING_NUMBER]) & 
"&REDIRECT=1" &
"&uid=6157691370"
You are better of formatting a URL formula with one query parameter per line even in situations above the last two parameters are constants and could be written as one string:
"&REDIRECT=1&uid=6157691370"
You may think you are shortening the formula if you do this or you may not think you don't need any greater generality but you will just be making your formula more difficult to read and maintain in the future.
(Edited)
Photo of Liang xie

Liang xie

  • 170 Points 100 badge 2x thumb
I figure it out
thanks a lot