rosalbaperez
28th December 2002, 00:59
What events are available for multioccurence forms? I'm looking specifically the event when the control jumps from the actual occurence to another...

Thanks in advance!

Rosalba

NPRao
28th December 2002, 02:21
Are you looking for - Flow of 4GL engine (http://www.baanboard.com/programmers_manual_baanerp_help_4gl_features_flow_of_standard_program)

If not, please explain in detail.

rosalbaperez
28th December 2002, 02:44
I have a type 3 form and need to save the occurance before changing to the next record, when there is a change on any field or when is a new record.

When is a new record... if I'm in the last field and hit Tab automatically creates a new occurance... I want to save it before it creates a new one.

Rosalba

NPRao
28th December 2002, 02:49
Try to search on the keyword - execute(update.db)on the Board here.

http://www.baanboard.com/baanboard/search.php?s=&action=showresults&searchid=71985&sortby=lastpost&sortorder=descending

To determine if there was a change in a field's value you can use the predefined variable -

long attr.changed 4R
Indicates if the current field has changed.

To check if you are insert mode you can use the variable - update.status = add.set

rosalbaperez
30th December 2002, 21:40
Thanks for your help. I was hopping to find a way to skip the check on each field in the form.
I guess I need to check on each field if there was a change and then execute(update.db) when the record exist. And for a new record, I just need to check on the last field if update.status = add.set and execute(update.db)

Rosalba

rosalbaperez
30th December 2002, 21:49
I get this message when compiling the script:

'execute' not allowed in section 'after.input'

Is this going to give me any problems?

Thanks
Rosalba

NPRao
30th December 2002, 22:05
Please refer to the online manual about the usage of - execute() (http://www.baanboard.com/programmers_manual_baanerp_help_functions_form_and_form_field_operations_execute)


You can use this function in 4GL scripts only. You can use it in the following event subsections:

before.choice, on.choice, after.choice
init.form, before.form, after.form, on.entry

You cannot use the function in the after.choice section of choice.update.db.

rosalbaperez
31st December 2002, 21:33
Thanks for your help NPRao!

Rosalba