Page 1 of 1
[VLF ONE RAMP] How to pass a value to #RAMPUser and #RAMPpassword of UF_OLOGON IIP
Posted: Tue Mar 03, 2020 1:56 pm
by Taku Izumi
Hi,
I want to pass values from Web part to #RAMPuser and #RAMPpassword of CheckUserCredentials method routine of UF_OLOGON.
However, I can't find a way.
Please let me know if anyone knows.
Regards,
Taku
Re: [VLF ONE RAMP] How to pass a value to #RAMPUser and #RAMPpassword of UF_OLOGON IIP
Posted: Tue Mar 03, 2020 3:59 pm
by JamesDuignan
Hi Taku,
Is this what you are looking for
https://docs.lansa.com/14/en/lansa050/i ... 0_2285.htm
regards,
James
Re: [VLF ONE RAMP] How to pass a value to #RAMPUser and #RAMPpassword of UF_OLOGON IIP
Posted: Tue Mar 03, 2020 10:12 pm
by Taku Izumi
Hi James,
I will explain what I want to do again.
I created this custom logon form ancestor VF_AC026O.

- VLFONE_LOGON.PNG (14.86 KiB) Viewed 1708908 times
And, I want to pass two values of the RAMP user and the RAMP password fields on this logon form to the method routine CheckUserCredentials of the shipped UF_OLOGON, and want to check a validation of two values.
In the method routine CheckUserCredentials, there are method parameters #RAMPuser and #RAMPpassword, so I thought there was some way to pass the RAMP user and the RAMP password fields to those parameters.
Is there any way?
Regards,
Taku
Re: [VLF ONE RAMP] How to pass a value to #RAMPUser and #RAMPpassword of UF_OLOGON IIP
Posted: Wed Mar 04, 2020 1:48 pm
by MarkD
Those parameters are passed into CheckUserCredentials containing the user and password entered.
You may then change them in CheckUserCredentials and return them to the VLF-ONE client to be used to start RAMP sessions.
This is designed to allow the user to logon as "FredBloggsSmythe" (say) and to start RAMP sessions as IBM i user profile "FREDB".
i.e. The alternate user profile switch must be made by server side logic.
So I think your question is slightly broader - how, in general, can I pass custom client side data into the CheckUserCredentials method?
Re: [VLF ONE RAMP] How to pass a value to #RAMPUser and #RAMPpassword of UF_OLOGON IIP
Posted: Wed Mar 04, 2020 2:18 pm
by MarkD
The broader answer is (I am guessing) to first synchronously call a server side method and get it to 'remember' the required data within the session (e.g. the entered RAMP user and password in your case).
Then from method GetLogonSession retreive those 'remembered' session values and use them as required (e.g. Validate them and return them in parameters #RAMPUser and #RAMPPassword).
Re: [VLF ONE RAMP] How to pass a value to #RAMPUser and #RAMPpassword of UF_OLOGON IIP
Posted: Wed Mar 04, 2020 5:06 pm
by Taku Izumi
Hi Mark,
Thank you for your answer.
Your assumption is just right.
As next question, I do not know how to remember the data within the session and retreive those 'remembered' session values.
Is there an example for this?
Or, Should I refer DF_T62SMO?
Regards,
Taku
Re: [VLF ONE RAMP] How to pass a value to #RAMPUser and #RAMPpassword of UF_OLOGON IIP
Posted: Thu Mar 05, 2020 12:09 pm
by MarkD
I juste remembered these new client side user exits for RAMP:
https://docs.lansa.com/14/en/lansa048/i ... 8_8220.htm
Note how the start session one allows the RAMP user profile and password to be set just before a session is started.

- Capture.PNG (40.34 KiB) Viewed 1708866 times
This means that you can just send the values to the server for validation, but just remember them in your client during the session.
The server does not need to remember them, which makes things a bit easier and simpler.