February 15, 200718 yr Ok, I've been staring at this for a few days and have pages of notes to myself about possible ways to do this, but I'd like some input on whether I'm overlooking some nice clean way to do this. I'm working with a table "Timesheet" where employee timesheet records are stored, and table "ReportPreferences" where I'll store user preferences about the types of reports they run most frequently. In "ReportPreferences", I've got a field "EmpCode" and a field "ActivityType" each of which are formatted as checkboxes from value lists stored in other tables (Activities and Employees). If a user selects multiple criteria in one or both of these checkboxes, how can I best turn those choices into a scripted find (i.e., if they selected EmpCode of 1 and 3, and ActivityType of 2 and 6, how can I script a find to look for every Timesheet record either employee 1 or 3 performed either activity 2 or 6)? What I'm trying to do script-wise would be something like this if it's possible: Enter Find Mode Go to Layout ["TimeLookup" (Timesheets)] Set Field [Timesheets::EmpCode; {first choice selected from checkbox}] Duplicate Record/Request Set Field [Timesheets::EmpCode; {second choice selected from checkbox}] Perform Find To complicate matters (maybe), there may be up to 60 or so employees selected on a single report, though I am also providing some grouping options (all employees in Group A, all employees in Group B, etc.) I'm also open to "you're going about this all wrong!" if anyone has a better suggestion. : ~Courtney
February 15, 200718 yr Hi Courtney, You do not need to script the find this way. Take advantage of relationships. If you use as multiple key fields, the EmpCode and ActivityType then you can simply use a Go to Related Record step to get to the records. Take a look at this brief sample. The portal is only there to display the related records. The button with script goes to them. GTRR_example.zip Edited February 15, 200718 yr by Guest
February 15, 200718 yr Author Thank you so much. This looks like it will make several things much easier. If only I had the time to really learn everything FM has to offer instead of going on these hunting expeditions for specific solutions! Appreciate the help. ~Courtney
February 15, 200718 yr Author No, this is a custom file they've been using for many years, which I recently upgraded from FM4.
Create an account or sign in to comment