Hi,
I'd like to display commands on formview which is shown with Presentmode:Stack on RPG online form.
Is it possible to do so in some way?
In PGM1:
LRNG_Using('/RunOperation');
LRNG_SetProperties('Type: PERFORMACTION'
: 'PGM:PGM2'
: 'PresentMode:Stack'
: 'PARAM%1: 1121111'
: 'PARAM%2: Tokyo');
LRNG_ENDUSING();
This will perform PGM2 with PresentMode:stack.
PGM2 screen will be shown with PresentMode:Stack,but commands are not shown even if we create formview "PGM2" with commands set in LongRange studio.
Is there any way to show commands on formview shown with PresentMode:Stack?
Any advice will be appreciated.
Best Regards,
Megumi Sawada
[RPG]Display commands on Presentmode:Stack formview
-
MegumiSawada
- Posts: 268
- Joined: Tue Feb 19, 2013 5:18 pm
[RPG]Display commands on Presentmode:Stack formview
- Attachments
-
- IMG_6554.jpg (24.15 KiB) Viewed 3447 times
-
tsupartono
- Posts: 289
- Joined: Wed Apr 18, 2012 10:21 am
Re: [RPG]Display commands on Presentmode:Stack formview
Hi Megumi,
You have two options here:
1) Use the 'OpenForm' operation (instead of PerformAction).
With 'OpenForm' operation, you'd specify the Form View name (as specified in the LongRange Studio), instead of the program name.
For example (using DDS):
2) Use the 'LRNG_SwitchToFormView' in conjunction with PerformAction operation.
When you use PerformAction operation, the form commands are not updated because LR doens't know which Form View corresponds to that program you specified in the PerformAction operation.
The LRNG_SwitchToFormView function does exactly that - it tells LR that you want to use a specific Form View.
You have two options here:
1) Use the 'OpenForm' operation (instead of PerformAction).
With 'OpenForm' operation, you'd specify the Form View name (as specified in the LongRange Studio), instead of the program name.
For example (using DDS):
Code: Select all
A 8 5HTML('
A Type:Button
A Text:"Show Details"
A OnClick.Operation
A (
A Type:OpenForm
A PresentMode:STACK
A Name:EMPDETAILS
A )
A ')
When you use PerformAction operation, the form commands are not updated because LR doens't know which Form View corresponds to that program you specified in the PerformAction operation.
The LRNG_SwitchToFormView function does exactly that - it tells LR that you want to use a specific Form View.
-
MegumiSawada
- Posts: 268
- Joined: Tue Feb 19, 2013 5:18 pm
Re: [RPG]Display commands on Presentmode:Stack formview
Hi Tony,
Thank you for your advice.
I have some questions regarding your reply.
1)Is 'OpenForm' operation available in Online form?
Also, can we pass/get parameters between formviews when using 'OpenForm' operation?
2) I have tried 'LRNG_SwitchToFormView' with PerformAction.
However, no commands are displayed. Can you display it on English environment?
FYI: I have wrote as follows;
LRNG_SwitchToFormView('LRDEMO0001'); ---> LRDEMO0001 is the formview to switch to.
LRNG_Using('/RunOperation');
LRNG_SetProperties('Type: PERFORMACTION'
: 'PGM:LRDEMO001'
: 'PresentMode:Stack'
: 'PARAM%1: 1121111'
: 'PARAM%2: 東京都 ');
LRNG_ENDUSING();
LRNG_SwitchToFormView('HLDEMO005'); ---> HLDEMO005 is the formview to switch back to.
IsNewForm = False;
Regards,
Megumi
Thank you for your advice.
I have some questions regarding your reply.
1)Is 'OpenForm' operation available in Online form?
Also, can we pass/get parameters between formviews when using 'OpenForm' operation?
2) I have tried 'LRNG_SwitchToFormView' with PerformAction.
However, no commands are displayed. Can you display it on English environment?
FYI: I have wrote as follows;
LRNG_SwitchToFormView('LRDEMO0001'); ---> LRDEMO0001 is the formview to switch to.
LRNG_Using('/RunOperation');
LRNG_SetProperties('Type: PERFORMACTION'
: 'PGM:LRDEMO001'
: 'PresentMode:Stack'
: 'PARAM%1: 1121111'
: 'PARAM%2: 東京都 ');
LRNG_ENDUSING();
LRNG_SwitchToFormView('HLDEMO005'); ---> HLDEMO005 is the formview to switch back to.
IsNewForm = False;
Regards,
Megumi
-
tsupartono
- Posts: 289
- Joined: Wed Apr 18, 2012 10:21 am
Re: [RPG]Display commands on Presentmode:Stack formview
1) Yes you can use it to open online forms, but you can't pass parameters.
2) You have to put the LRNG_SwitchToFormView in your LRDEMO001 program (not in the calling program).
2) You have to put the LRNG_SwitchToFormView in your LRDEMO001 program (not in the calling program).
-
MegumiSawada
- Posts: 268
- Joined: Tue Feb 19, 2013 5:18 pm
Re: [RPG]Display commands on Presentmode:Stack formview
Hi Tony,
2)
I have confirmed the commands are shown!
Thank you!!
Best Regards,
Megumi
2)
I have confirmed the commands are shown!
Thank you!!
Best Regards,
Megumi