Programatically executing an event

Please do not use to report errors- use your regional help desk.
Please mark posts as being for RPG or RDMLX (LANSA) developer.
To subscribe by email, display this forum, scroll to the end and select ‘Subscribe Forum’.
Post Reply
billcros
Posts: 18
Joined: Fri Apr 11, 2014 10:27 pm

Programatically executing an event

Post by billcros »

Is it possible programatically execute an event or request ? For example run a command that would execute event BUTTON.OnClick without the user having to click the button ?
Paul

Re: Programatically executing an event

Post by Paul »

You can use the PerformAction operation to send an action request to the nominated program.

Follow this link for more details;

http://www.longrangemobile.com/docs/lan ... action.htm

Please post more details if this doesn't help.
billcros
Posts: 18
Joined: Fri Apr 11, 2014 10:27 pm

Re: Programatically executing an event

Post by billcros »

Doesn't that require the UPLOAD.ONCLICK event to execute for the action to be performed ? What I want to do is execute the UPLOAD.CLICK event with a user having to tap the UPLOAD button.
MarkDuignan
Posts: 346
Joined: Wed Apr 18, 2012 10:33 am

Re: Programatically executing an event

Post by MarkDuignan »

I think the operation PeformAction will do this for you.

http://www.longrangemobile.com/docs/LRP ... action.htm

If the upload button signals action “UPLOAD” and you set the Action property in a PerformAction operation to “UPLOAD” you should get the same logic executed in the server program. It would not know the difference between a physical button touch or a perform action operation being executed.
billcros
Posts: 18
Joined: Fri Apr 11, 2014 10:27 pm

Re: Programatically executing an event

Post by billcros »

In RDMLX the Set_Op_ExecuteAction command (shown below) is associated with an event. What event should be used if I want to execute the UPLOAD.ONCLICK event ?

#COM_OWNER.Set_OP_ExecuteAction Event(UPLOAD.ONCLICK) Program(LREX0303) Action(UPLOADDATA) Senddbdata(TRUE) Submitprops_Normal(ALL) Submitprops_Heavy(ALL)
MarkDuignan
Posts: 346
Joined: Wed Apr 18, 2012 10:33 am

Re: Programatically executing an event

Post by MarkDuignan »

I understand that you don't want to have to touch the upload button button to fire the operation.

How and when do you want it to fire?

Also - are you doing an online or local/offline form?
Post Reply