Track a UPS number

Use this Forum to post your “How to …” questions about your use of aXes. This is not a technical support forum. Both the aXes Support Team at LANSA and other aXes customers may answer your questions. LANSA cannot guarantee the accuracy of any information posted by customers.

Moderator: jeanmichel

Post Reply
WayneP
Posts: 14
Joined: 16 Mar 2016, 02:54

Track a UPS number

Post by WayneP »

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?
User avatar
jeanmichel
Posts: 109
Joined: 23 May 2014, 11:37
Location: Sydney

Re: Track a UPS number

Post by jeanmichel »

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:

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");
3) So now perhaps a similar code can be used to query the UPS tracking number.

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 |
WayneP
Posts: 14
Joined: 16 Mar 2016, 02:54

Re: Track a UPS number

Post by WayneP »

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?
Post Reply