Field display in Frame

daranroo7

New Member
Hi,
I have a scenario like, there is a display of 10 fields. the existing program displays this using frame.

now i need to make one among the field display based on a condition. can i achieve this with display statement? if yes please let me know how?

when i tried using "when", though values are not displaying, the column space is reserved for that particular field. Since there are 28 display stats in the code, it is difficult to replace all the "display" with "put" statement.

please let me know is there a way to achieve this using "display" statement itself.

Thanks and Regards,
Daniel Ranjit.R
 
This is simply procedural programming.


U have a standard display procedure:
DO: /* display */
DISPLAY
whateverFeld
whateverFeld
whateverFeld
END. /* display */

This can be an include, .p or whatever

In UR code have a condition check:
IF whatever checking for .....
run standard display procedure
 

daranroo7

New Member
Hi Mjpowell,

thanks for your reply.
yes i thought of this. but the issue here is there could be more combination of display statements and in turn i will end up with creating that much include file or .p which would not be an ideal one i suppose...

pls correct me if i am wrong..n let me knw ur suggestion...

Thanks and Regards,
Daniel Ranjit.R
 
definition

U gave UR definition of the problem initially:
... need to make one among the field display based on a condition.

A solution was given, which in turn the problem changed.
...could be more combination of display statements

So is a static display statement required or not, because now there could be more combination. Talk about moving the goal posts.
Either a static requirement is required or not.

Have preprosessors to comprise the statement. So when U ARE aware of the requirements - U have a solution.

&SCOPED-DEFINE preprocessorName whatActuallyShouldBeHere

IF whatEver THEN preprocessorName
 

tamhas

ProgressTalk.com Sponsor
Re: definition

No need to be rude just because someone isn't thinking or talking clearly.

But, the OP needs to realize that a frame definition for a display is composed at compile time. Therefore, it is going to have a fixed layout. Things can appear and disappear conditionally, but they don't move. The layout remains the same.

To create a dynamic layout, e.g., like a mailing label where there may or may not be a line for company name by the address is always the top N lines and the whitespace is at the bottom, you are going to have to go the put route or dynamically design the frame.

End of story.
 
Top