Page 1 of 1

[RDMLX]Set_sendmessage requires Event property

Posted: Thu May 11, 2017 12:53 pm
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

Re: [RDMLX]Set_sendmessage requires Event property

Posted: Fri May 12, 2017 6:46 am
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.

Re: [RDMLX]Set_sendmessage requires Event property

Posted: Thu May 18, 2017 5:53 pm
by MegumiSawada
Hi Tony,

I see. Thank you.

I will tell this to the customer.

Best Regards,
Megumi Sawada