andy2609
30th August 2016, 18:12
When entering data to a multi-occurence form, the displayed data - prior to data input - always displays the previous record's data. This seems to be standard Baan functionality - as an example for a type 2 form, see standard session tcmcs0118m000 (Item Signals), which behaves this way.

Having tried many UI script options (before.field, before.display, before.input, before.display.object etc.), plus having considered DAL object and property hooks ('set.object.defaults' and 'fieldname.set.defaults' are only executed for DAL.new or DAL.update, so cannot be used in this case), it seems that the standard program always reverts to this default last, after having executed everything else, prior to data entry.

Does anyone know how to initialise all data input fields as null, prior to entry of a new record in this case? (At table level, specific defaults can be set, but not blank defaults.)

bhushanchanda
30th August 2016, 18:28
Hi,

You can use attr.dorp for clearing the values from previous record.

e.g.

field.field_name:
before.input:

attr.dorp = 1

long attr.dorp 4 Fill field with default or previous value:

DORP.PREVIOUS (0) use the previous value
DORP.DEFAULT (1) use the default value

andy2609
30th August 2016, 19:02
Thanks for your prompt note on this one bhushanchanda. A predefined variable I wasn't familiar with! Works fine, of course.