Page 1 of 1

Field Scripts

Posted: Mon Jul 31, 2006 5:14 pm
by Vince
When putting script behind a cardfile field the correct method is to 'Return' the data rather than use ScrRead().
My question is. Should a save event fire when data has been returned?
TIA
Vince

Posted: Wed Aug 02, 2006 5:18 pm
by COBS Tech Support
From a design point of view you should avoid changing field values in database fields using functions such as SCRWrite(), when placing scripts behind field formulas. Yes, changing a field may cause the 'save' event to trigger, and more so in later versions of CAPITAL which has a more sophisticated multi-user field locking mechanism for record management.

If you need to change a field's contents its strongly recommended you do so inside the screen script instead, and monitor the change field focus event.