Track a UPS number
Moderator: jeanmichel
Track a UPS number
So, if I had a field on my IBMi screen that was a UPS tracking number, is there a way to program aXes, so that clicking on it, would open another window (the UPS website) and pass the tracking information and have it displayed?
- jeanmichel
- Posts: 109
- Joined: 23 May 2014, 11:37
- Location: Sydney
Re: Track a UPS number
Hi Wayne,
This is definitely possible. However I do not know the specifics of the UPS website and whether you can query if via the URL. You will have to find this out. I will take the example of searching for a specific query in Google. I will try and give you a step by step introduction on how to do this.
1) The first step is to name your field in the axes designer. WE are going to use the command line on the main menu fort his example.
So open the aXes development environment and name the command line to "commandline". (in the Screens Tab)
2) add a push button extension onto the screen.
Set it's on click even to the following script:
3) So now perhaps a similar code can be used to query the UPS tracking number.
Hope this helps.
This is definitely possible. However I do not know the specifics of the UPS website and whether you can query if via the URL. You will have to find this out. I will take the example of searching for a specific query in Google. I will try and give you a step by step introduction on how to do this.
1) The first step is to name your field in the axes designer. WE are going to use the command line on the main menu fort his example.
So open the aXes development environment and name the command line to "commandline". (in the Screens Tab)
2) add a push button extension onto the screen.
Set it's on click even to the following script:
Code: Select all
// Find the field called "commandline"
var cmdline = FIELDS("commandline");
// Extract the value present in the input
var cmd = cmdline.getValue();
// Use the value of the field to concatenate with the URL from google to create the search criteria.
var url = "https://www.google.com.au/search?q=" + cmd;
// Open a new tab showing the URL
window.open(url,"_blank");
Hope this helps.
Regards,
Jean-Michel Rapin
LANSA Pty Ltd
email: JeanMichel.Rapin@lansa.com.au
Address: 122 Arthur Street, North Sydney, NSW 2060, Australia
Tel: +61 289 070 262 http://www.lansa.com | http://blog.lansa.com |
Jean-Michel Rapin
LANSA Pty Ltd
email: JeanMichel.Rapin@lansa.com.au
Address: 122 Arthur Street, North Sydney, NSW 2060, Australia
Tel: +61 289 070 262 http://www.lansa.com | http://blog.lansa.com |
Re: Track a UPS number
Jean-Michel,
Awesome this worked great !!!
for future reference, to get to the UPS web site for tracking here's the URL:
http://wwwapps.ups.com/WebTracking/trac ... XXXXXXXXXX
Is there a way to paste into the script editor? Is there a way to make the font and edit box bigger?
Awesome this worked great !!!
for future reference, to get to the UPS web site for tracking here's the URL:
http://wwwapps.ups.com/WebTracking/trac ... XXXXXXXXXX
Is there a way to paste into the script editor? Is there a way to make the font and edit box bigger?