Page 1 of 1

Issue trying to add a (large) field to a DISPLAY command

Posted: Thu Apr 11, 2024 8:59 pm
by n-gage
Hi!

We have an existing LANSA WebEvent Function (on iSeries) where we have a GROUP_BY (#DSP01) with a list of about 20 fields and also a DEF_LIST (#GM_BR01) for a browse list of about 10 fields.

This is displayed as follows within the code:

Code: Select all

Display Fields(#DSP01) Design(*DOWN) Identify(*DESC) Browselist(#GM_BR01) Exit_Key(*NO) Menu_Key(*NO) Prompt_Key(*NO)
The #DSP01 fields show header information, whilst #GM_BR01 show line information.

We have a requirement to add an extra field to #DSP01, and this field is 250+ chars in size.

When I add the field to #DSP01 and try to check-in and compile the function I get the following error:

Code: Select all

** Unable to fit all of BROWSING portion of the display onto last format - error occurred at field XXX
** Errors found in DISPLAY Command
Where XXX is one of the fields in the browse list #GM_BR01

If I reduce the size of the new field then it still errors but the field it shows in error (XXX) may change to depending on the size I set the new field.

When I reduce the size of the new field to 74 chars or less it finally works - I can check-in with no compile errors.

Obviously, I've hit some limit when trying to add this new field in, but does anyone know what this limit is, is it defined anywhere? And maybe any rough ideas how I could get around this limit?

Cheers!

Issue trying to add a (large) field to a DISPLAY command

Posted: Thu Apr 11, 2024 11:39 pm
by René Houba
Hi n-gage,

Is this an RDMLX function?

For non webevent RDMLX functions, it's not possible to have a REQUEST or DISPLAY command in the function, but that is possible when you have *WEBEVENT defined in the LANSA FUNCTION command.

You can use RDMLX fields then as well.

SO what happens if you change your function into RDMLX?

Kind regards,
René

Re: Issue trying to add a (large) field to a DISPLAY command

Posted: Fri Apr 12, 2024 8:25 am
by Tim McEntee
An old memory

You can add multiple request statements in your code. The first one the program hits is the one that is shown. If you use a page variable in that first display/request you can then use the manually created page that the page variable points to, and paint a screen that uses all of the variables from the multiple request statements.

This is pretty standard Webevent practice for anything more complex than a simple page.