Multiple form wrappers in same screen

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
Posts: 4
Joined: Tue May 18, 2021 11:35 pm

Multiple form wrappers in same screen

Post by wramirezch » Wed Jun 23, 2021 1:10 am

Hi, How can I call multiple form wrappers on a screen using VLF-ONE?

Thanks. Regards,

User avatar
Posts: 134
Joined: Fri Jul 19, 2019 7:49 am
Location: Robbinsville, NC

Re: Multiple form wrappers in same screen

Post by Dino » Wed Jul 07, 2021 5:10 am

You can generate individual wrappers for each destination screen you want, then combine the code of those several form wrappers to get all the correct ID_IFLDxxxx and ID_TEXTxxxx and to make your complete screen that mixes it all.

Before to combine, you may want to change using a replace all, the fields identified as #ID_ something in the second screen to #ID2_ for example, and in the third screen #ID3_ , that makes it easier to combine them.

Then you want to have a way to know in the code, which destination you are right now, and that field is the #FormName that you receive in the uInitializeForForm routine.

Code: Select all

Mthroutine Name(uInitializeForForm) Options(*REDEFINE)
* This is called just the first time this form arrives
#COM_ANCESTOR.uInitializeForForm Formname(#FormName)
So if you have three different destinations, screen identified as FIRST, SECOND, THIRD respectively, you can know that in your code checking the value in the field #FormName

Then each ramp-ts script of those destinations can call the single wrapper where you consolidated it all.

Post Reply