Page 1 of 1

(RDMLX) set element's value for Paramvalue of Set_EventParameter.

Posted: Sat Apr 04, 2015 10:15 am
by Yukiko Ikeo
Hi,

I'd like to set element's value for Paramvalue of Set_EventParameter.
(ex. the value of the textbox, the text of the label)
The coding below doesn't work as expected.

---------------------------
* elements
#COM_OWNER.Set_TextBox Name(TEXT) Value('ABCDE') Layout_Col(1) Layout_Row(1) Maxlength(20)
#COM_OWNER.Set_Label Name(LABEL) Layout_Col(1) Layout_Row(2) Text('Label') Border_Thickness(1)

* set event parameter
#COM_OWNER.Set_EventParameter Event(BUTTON.Onclick) Param_N(1) Paramvalue(TEXT.Value)
#COM_OWNER.Set_EventParameter Event(BUTTON.Onclick) Param_N(2) Paramvalue('/Form.Fields.LABEL.Text')
---------------------------

How can I set element's value as the other method's parameter?

Regards,
Yukiko Ikeo

Re: (RDMLX) set element's value for Paramvalue of Set_EventParameter.

Posted: Tue Apr 07, 2015 10:48 am
by MarkDuignan
I think you need to get the value first into a field - then set from the field.
ie: Your reference to TEXT.Value is really just the string "TEXT.VALUE" to the RDMLX code generator - it has no special meaning.

Re: (RDMLX) set element's value for Paramvalue of Set_EventParameter.

Posted: Tue Apr 07, 2015 1:16 pm
by Yukiko Ikeo
Hi Mark,

Thank you for your reply.
The coding below worked as expected.

---------------------------
* set event parameter
#COM_OWNER.Using Element('/Form.Fields.TEXT') Alwaysrememberlast(True)
#COM_OWNER.Get Property(Value) Into(#STD_TEXT)
#COM_OWNER.EndUsing
#COM_OWNER.Set_EventParameter Event(BUTTON.Onclick) Param_N(1) Paramvalue(#STD_TEXT)
*
#COM_OWNER.Using Element('/Form.Fields.LABEL') Alwaysrememberlast(True)
#COM_OWNER.Get Property(Text) Into(#STD_TEXTL)
#COM_OWNER.EndUsing
#COM_OWNER.Set_EventParameter Event(BUTTON.Onclick) Param_N(2) Paramvalue(#STD_TEXTL)
---------------------------

Thank you for your help.
Best regards, Yukiko Ikeo