[RDMLX]Set_sendmessage requires Event property

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
MegumiSawada
Posts: 268
Joined: Tue Feb 19, 2013 5:18 pm

[RDMLX]Set_sendmessage requires Event property

Post by MegumiSawada »

Hi,

When you would like to show message box on the form, you will write like this:

Code: Select all

#Com_Owner.Set_Sendmessage Event('/Form.Onload')
In RPG, there's no "event". You just need to write "RunOperation" where you would like to run the operation.

Code: Select all

LRNG_USING('/RUNOPERATION');                              
  LRNG_SETPROPERTIES(                                     
    'TYPE : SHOWMESSAGE'                                  
   :'TITLE : Confirm '                                     
   :'MESSAGE : Do you want to upload data?'          
   :'CANCELBUTTONIDX : 2'                                 
   :'BUTTON%2.TEXT : No'                            
   :'BUTTON%1.TEXT : Yes'                                           
                    );                                    
LRNG_ENDUSING(); 

Why we need to specify Event property in RDMLX, not only writing Set_Sendmessage method where you would like to run the operation like RPG?

Best Regards,
Megumi Sawada
tsupartono
Posts: 289
Joined: Wed Apr 18, 2012 10:21 am

Re: [RDMLX]Set_sendmessage requires Event property

Post by tsupartono »

Hi Megumi,
You can use either OnLoad event or RunOperation in your RPG and RDMLX programs.
Here is an example of OnLoad event in RPG:

Code: Select all

LRNG_AssignStrToProp('ShowMessage' : '/Form.OnLoad.Operation.Type')
LRNG_AssignStrToProp('This is an example!' : '/Form.OnLoad.Operation.Text')
Conversely, you can use the RunOperation in RDMLX:

Code: Select all

#COM_SELF.Set Property('/RunOperation.Type') To(ShowMessage)
#COM_SELF.Set Property('/RunOperation.Text') To('This is an example!')
For online forms, RunOperation and the form's OnLoad event have the same effect and will yield the same result.
However, RunOperation is not applicable and can't be used in offline forms - you must use OnLoad event if you want your code to run when a form is loaded.
MegumiSawada
Posts: 268
Joined: Tue Feb 19, 2013 5:18 pm

Re: [RDMLX]Set_sendmessage requires Event property

Post by MegumiSawada »

Hi Tony,

I see. Thank you.

I will tell this to the customer.

Best Regards,
Megumi Sawada
Post Reply