lsatenstein
16th February 2006, 22:49
I have a form which has the key area as the search field, and the details following.

When I do a << or a >>, and the next layout has fewer rows, I end up with display.only output from the preceding form still showing on the rows following the last entry.

I would like to start with a fresh form when I do a << or >> (prev group, next group)

Leslie

NPRao
16th February 2006, 23:06
Refer to the function - blank.all() (http://www.baanboard.com/programmers_manual_baanerp_help_functions_form_and_form_field_operations_blank_all)

lsatenstein
17th February 2006, 02:28
Blank.all() does the opposite of what I want. Sorry.


Think of my problem this way. A type 2 form date controlled.
dddd
xx1 display.only.value.of.xx1
xx2 display.only.value.of.xx2
. . .. .. .. . . . .
x12 display.only.value.of.x2

For day 1, I have 12 lines, with some input fields and some display only fields
I go to day 2 using the next group >>
This day I have 3 lines. But the remaining 9 lines containing display only fields are not erased. I have

xx1 display.only.value.of.xx1
xx2 display.only.value.of.xx2
xx3 display.only.value.of.xx3
display.only.value.of.xx4 (from previous day)
display.only.value.of.xx5 (from previous day)

I would like to erase the display.only output fields from my last xx3 line to the bottom of the form.

en@frrom
17th February 2006, 11:24
I think the function NP suggested (blank.all() ) WILL do the job. I don't know exactly what your script looks like - maybe you could post it so we can understand your case better - but probably you should apply blank.all on choice.next.view: before.choice:

NvpBaaN
17th February 2006, 14:39
But the description of blank.all() clearly says that display.only fields are not cleared...
---
This clears all display fields and input fields on the current form. Display only and input only fields (that is, display and input fields that are not included in the form’s TAB sequence) are not cleared.

---
probably you have to blank out each display-only field for all the filled occurances whenever the view changes...

lbencic
17th February 2006, 19:31
I think the problem is with the 'Display Only' setting. These will not reset without manual intervention. Using 'Display' instead will let the 4GL take care of the refresh. But maybe that is not possible for what you are doing..? In that case, probably on each change view you will need to do a do.all.occ(blank.my.fields) call, where 'blank.my.fields' is a function call that blanks the fields on the line....?