AnsweredAssumed Answered

I'm having trouble setting a global variable using a script trigger

Question asked by GingerChristie on Feb 21, 2016
Latest reply on Feb 22, 2016 by GingerChristie

I'm working on a FM14 file that generates employment contracts for teachers. Each year the rate of the raise is the same for everyone. The number of school days (used to find daily and hourly rates) changes from year to year. We used to enter a field and do a Replace Field Contents for all of the records.  I'd like to enter these numbers once and have them used for every record, and if they change, recalculate.


I set up two number fields - rateRaise and daysAcademic. When data is entered in these fields, I use an OnObjectSave script trigger to set global variables ($$rateRaise and $$daysAcademic) to equal the value entered into those fields.

The first time I enter data it worked for all records. When I change the info, only the active record shows the updated info and calculations. Maybe I'm not using the global variables correctly?