jatin_sanghi
29th October 2009, 06:18
Hi All,

(LN 6.1 FP2)

I have a type 2 form where I have purchase requisition numbers, positions and order types. I have to assign order type to each of requisition/position.

Now, the requirement is that, If I assign an order type to one requisition/position and then try to assign a different order type to another line of that requisition, the system should stop me from doing that. That means, I should be allowed to enter either blank or same order type for all lines of a requisition.

I'am able to do this, if a line record with order type is already stored in DB, but if I tab through records, records are not saved so far in database and thus the required comparison is not happening.

How do I achive this? Also, Is there a way I can save the record as I tab through the last field.

regards,

Jatin

ulrich.fuchs
29th October 2009, 08:36
From the programmers guide

Syntax:

function void enable.save.on.occ.change ()

Description


Use this function to force the 4GL Engine to save an occurrence at the time the user selects or moves to another occurrence. Any unsaved changes to the occurrence, will be automatically saved. I.e. the UPDATE.DB choice is executed and the 4GL engine will continue in the previous mode (MODIFY.SET or ADD.SET).


Context

This function can be used in all script types.

Notes
Use this function only in the after.form.read section.


Uli

jatin_sanghi
29th October 2009, 14:55
Hi Uli,

Thanks so much for your help...this is working..!!

However, do yoou have any idea, as how can we compare two records on a list session before saving them to database.

regards,

jatin

Hitesh Shah
31st October 2009, 08:50
Database fields can be checked using do.occ / do.all.occ function before save action in multi-occ session .