2 Replies Latest reply on Sep 20, 2013 1:36 PM by BillPlunkett

    "Best Practices" Question



      "Best Practices" Question


           Say I have a table of Contacts which has several different "types" of Contacts (Vendors, Customers, Other...).  I want to have only one layout to maintain all of these Contact types so I stick a field in a related table (acts like a global variable but one that I can edit on the layout) to indicate which types to include in the set.

           Is there a preferred way to setup the interface for the user to select the contact types he wants to work with?



        • 1. Re: "Best Practices" Question

               Rather than a field in a related table, I'd just use a field with global storage. Since such a field can be defined in any table and you can still access it from any layout, you can define it in any table that is convenient. I define a special "globals" table for such fields in most of my solutions.

               Then a script trigger on this field can perform a find using the text in the global field to set up the needed find criteria to find all contacts of a specific type.

               Here's a thread with a number of scripted find examples, that use data in global fields in this fashion, that may provide some useful ideas for you: Scripted Find Examples

          • 2. Re: "Best Practices" Question

                 That's exactly the type of info I was looking for.

                 I'm still working out how to do things in FM like that that are "no brainers" in more standard programming languages.