AnsweredAssumed Answered

Select All Check Boxes Relating to a Work Ticket

Question asked by rustyshackleford on Sep 25, 2015
Latest reply on Sep 25, 2015 by rustyshackleford

Hey everyone,


So I have a very specific problem I need help with. Ultimately, it deals with selecting and deselecting checkboxes on a layout.


The way I check a box in FM is to have a field called "ts_PreBillFilter_CheckBoxSelectedRecord" and when the checkbox is clicked, it runs a script, so the checkbox is acting as a button, and the script it runs deselects the checkbox  if it's already been checked. If the checkbox hasn't been checked yet, it puts a check in it. Below is the exact script that runs when the checkbox is clicked:


Set Field [rel_TimeSlips_Globals_Prebill_Filter_to_MASTER_Slip_Entries__MAIN::ts_PreBillFilter_CheckBoxSelectedRecord;



Substitute ( rel_TimeSlips_Globals_Prebill_Filter_to_MASTER_Slip_Entries__MAIN::ts_PreBillFilter_CheckBoxSelectedRecord;[ MASTER_Slip_Entries::a_SlipGUID & ¶; ""])




MASTER_Slip_Entries::a_SlipGUID  &  ¶



The check that is arranged above the box is hidden if it's related slip unique ID # isn't in the list of slip unique identifier #s in the ts_PreBillFilter_CheckBoxSelectedRecord column.


I also have a "check all checkboxes" button which checks all displayed boxes in the layout. If there aren't any check boxes already, the script steps through each found record in the layout and adds the record's unique slip ID # to the ts_PreBillFilter_CheckBoxSelectedRecord column. If there are any check boxes already selected, the script set the column ts_PreBillFilter_CheckBoxSelectedRecord="", so it deselects all boxes. An image is attached showing this script.


What I need is a "select all boxes for a specific work ticket" button. To better explain this, I'll explain the relationships of slips to worktickets to projects. For one project, there are many worktickets, and for one workticket, there are many slips, so to make this "select all boxes for a specific work ticket" button, should I have the button only select all slips that relate to the selected projectID or should I go with adding a relationship? I'm a little confused as to how to go from here.