pjohns
11th October 2013, 15:24
Hello,

I have a form field, tssma951.bupo, which is being populated with the following logic.

field.tssma951.bupo:

before.display:
bu = enum.descr$("tssma.bu", tssma951.bu)

tssma951.bupo = bu & "." & tssma951.custpo

The bupo form field is displayed correctly but the field data is not being populated in the table.

I'm sure I'm missing something very simple, but then my Baan programs skills are very simple.

What do I need to do to write the field data to the table?

Thanks in advance.

PJ

bbhawesh
11th October 2013, 15:34
What is the main table of this session? What is the session type?

pjohns
11th October 2013, 15:37
The main table is tssma951 and the session type is "Maintain"

bhushanchanda
11th October 2013, 15:44
Play around with some other subsection like before.field:

also try this:

main.table.io:

before.write/before.rewrite:

assign all the values here....


One more way or a trick is to change the maintain session to update session. Just give it a try.

pjohns
11th October 2013, 17:17
Hello,

using 'after.display' resolved my issues however, I now have another query.

If I copy and change an existing record my calculated form field does not change to reflect the new data. How would I go about reseting this field first?

Thank you.

bhushanchanda
11th October 2013, 17:24
Hi,

How is this form field calculated?

For example if its calculated based on table fields then you can do this in the table field,

field.table_field:
after.display: | or after.field or when.field.changes
| here you can add the logic for the calculated field


If on LN, you can use before.display.object or before.new.object.

As you solved the first problem, the second will be resolved similarly. Also try refresh().