Accessing variable values in different record formats
Posted: Wed Jul 15, 2020 11:48 am
I have two record formats in a display file. When a button is clicked on the first record format, the control is passed to the RPG program by the below javascript code set in OnClick property:
The CCS1ACTION field value ("MAP") shows up in the RPG program as required.
But what I am trying to do is to use the value of the CCS1ACTION field value in the OnLoad Javascript of the second record format. But as I found out, this value is not visible in the Onload javascript of the second record format.
I have put the below statement in the OnLoad script of the second format and I see the value Undefined.
What I want to access is the value set to CCS1ACTION from the first screen though the ChangeElementValue method.
Kindly provide your suggestions on how this can be achieved.
Code: Select all
changeElementValue("CCS1ACTION","MAP");
pui.click('btnSubmit');
But what I am trying to do is to use the value of the CCS1ACTION field value in the OnLoad Javascript of the second record format. But as I found out, this value is not visible in the Onload javascript of the second record format.
I have put the below statement in the OnLoad script of the second format and I see the value Undefined.
Code: Select all
alert(CCS1ACTION.getElementValue);
Kindly provide your suggestions on how this can be achieved.