0 pts.
 Variable Positioning of a Field in a display file
Is it possible to set the postion of a field in a display file as per the condition without using two record formats? Like, if a said condition is true, the field will be displayed at (10,10), otherwise it will be at (15,10).

Software/Hardware used:
ASKED: January 12, 2006  12:45 AM
UPDATED: January 12, 2006  7:11 PM

Answer Wiki:
Rajsekhar, Unlike HTML, DDS cannot handle two fields with same name. use two different CONDITIONED fields and populate them with the same value. Here is a working example. Simply compile both members and try it. Of course, you will replace the F5 with your own criteria to trigger the position of the fields. DDS - ========================================================== A CF03(03 'Exit') A CF05(05 'Refresh') A***************************************************************** A R REC1 A 1 6'CONDITIANLLY POSITION FIELD' A DSPATR(HI) A 3 2'FIELD1:' A 31 FLD1 20 3 11 A N31 FLD2 20 3 51 A 15 3'F3=EXIT F5=TOGGLE' ====================================================== RPG - ======================================================= FVARPOSD CF E Workstn *-------------------------------------------------------- D Value s 20 Inz('Hello There!') *-------------------------------------------------------- C Movel value fld1 C Movel value fld2 C exfmt rec1 C Dow *in03 = *off C If *in05 = *on C if *in31 = *on C eval *in31 = *off C else C eval *in31 = *on C endif C endif C exfmt rec1 c enddo C Eval *inlr = *on =================================================== Jay
Last Wiki Answer Submitted:  January 12, 2006  7:11 pm  by  Jay400   0 pts.
All Answer Wiki Contributors:  Jay400   0 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _