AnsweredAssumed Answered

Scrip Trigger for Drop down menu

Question asked by paul350passaic on Jun 27, 2013
Latest reply on Jun 29, 2013 by paul350passaic

Title

Scrip Trigger for Drop down menu

Post

     Hi, Im new in filemaker and scripting. Im using filemaker pro 12. Im trying to set up a timesheet for my small office. I have 4 fields involved. TimeIn, TimeOut, DayType and Hours Total. I manage to set all field right except for DayType.  I set up a drop down field for DayType where user can select if the day is regular, holiday, sick day, vacation, and hopping it would trigger or autopopulate the TotalHours with the corresponding value for each DayType.

     Regular is (nothing since the value will come from the calculation of TimeIn and TimeOut

     Holiday is 8.00 hours

     etc...

     I used a trigger for the dropdown:

     OnObjectSave:

     if[MyLayout::DayType = "Holiday"]

     insert Text [Select; MyLayout::TotalHours; "8.00"]

     End If

      

     but its giving me an error saying that the TotalHours field is not modifiable. Im not sure what to check whether TotalHours is locked or has any kind of restriction. Im thinking since my TotalHours has a "calculation" value, its not accepting the script trigger.

      

     pls help. Thanks!

Outcomes