chilloutdude
23rd May 2002, 05:38
Hi All

I am developing a editable multioccurence session with one view field. i have three fields that the user can edit out of which one is a yes/no check box. the user can check it and tab to the next record. suppose after checking 3 or 4 records, the user made a mistake on the first record by checking the yes/no field. now he wants to uncheck it, how do I fire the check that was originally there when the user started to check. in my case the below condition is getting fired even though i have not saved the record yet.

By the way there a condition on which the user can uncheck it( i am checking the inventory on the item and if the invenory is there the user is not allowed to uncheck it.).
can anybody help me with this????

Thanks,

evesely
23rd May 2002, 18:22
I guess I am not sure exactly what you are trying to do and what the problem. The check.input subsection should use the current row's record values in doing its checks. Perhaps you can explain what problem you are seeing in the validation.

shah_bs
24th May 2002, 06:50
If I understand correctly, you do not want the user to be able to change the field if there is inventory available on hand.

So, in the before.input event, set the field to 'checked' and the attr.input to false if inventory is available.

Thereafter, all other validation can be done in the check.input event.