spartacus
16th January 2002, 18:54
Hi all
I tried to zoom to a maintain session (tdilc1120m000). There I import some data, which automaticly should be saved to the main table (tdinv100). The import works find, but I didn“t manage that Baan saves the importet data to the main table (of course without stepping trough the fields)
Can comebody tell how I can store the importet data in the main table, after I assigned the values in a zoom.from section?
regards
spartacus
lbencic
16th January 2002, 20:31
When you zoom, you only look up records according to imported values, you do not change the values. This section gets activated before the form does a lookup, and it uses the values assigned to the main table fields for the lookup. After the lookup, the table field values may have changed, depending on what record is found. This does not accomplish an update. Zooms are usually used to take the user to another session for manual input.
To automate that, you usually use a different kind of programming - api's and such. It is possible to create a new function the sub-session to modify the fields you have imported and execute an update. You may try putting a button on the form to activate a new user function. Let the standard program do all the lookups, and when the user gets to the record, they can choose the update based on import button. The button will call code something like the following:
tdinv100.field1 = imported.field1
tdinv100.field2 = imported.field2
execute(update.db)
display.all()
You may or may not need a commit after that, I have never tried this method for this purpose.
If you don't like the button idea and you want to automate more, you can move it around, but you will be fighting with the standard program to get this in the proper section. Other options like execute(end.program) may help to automate more. You can call the execute(command) on any choice commands, but different commands are valid depending on what section you put them in.
Hope that gives you some direction - it's not exactly a tested solution.