1) Open aXes development environment

2) Load your project in TS2 and navigate to the screen you wish to customise
Click on "Work as a TS2 Developer"

Signon to your session

Type on the command line: "addlible axesdemo" followed by enter

Type on the command line: "call xhrrpgtrn" followed by enter

Put an X next to to an employee

If you don't have a screen definition, press suggest and save the screen.

3) Add a PushButton

4) Edit caption. Change the caption value to "Take Photo"

5) Edit script

Copy and paste the script hereunder in the edit box.
Please note you will need to amend the URL of your server as well as the username and the password required to connect.
Code: Select all
if (window.LRSV)
{
var config =
{
serverUrl: "http://server.domain.local/service/longreach.jsp",
credential: {user:"myusername",password:"mypassword}
};
LONGRANGE.FileTransfer.setDefaultConfig(config);
var options =
{
imageName : FIELDS("EmpID").getValue() + ".jpg",
annotate : true,
toIFSfolder : "{BASE}/"
};
try
{
LRSV.imageUpload(options);
}
catch (Error) { alert("problem uploading photo"); }
}

7) open aXes mobile and run your demonstration


