4 Replies Latest reply on Jan 14, 2009 12:43 PM by ninja

    Reference Tables

    netguykb

      Title

      Reference Tables

      Post

      I would like to create a Reference Table for storing values based on the names of custom filters I would like to execute upon selecting from a drop down menu. This table does not have to be associated with other tables, For instance:

      One dropdown choice would be: Account + New Lead + Less Than 10,000 Members

      If the user selects this from the drop down menu then I would exec a script that would look like this:

      Enter Find Mode []
      Set Field [Accounts::acount_owner; Get (Account Name)]
      Set Field [Accounts::acount_status; "New Lead"]
      Set Field [Accounts::acount_membership; "<10000"]
      Perform Find []


      The drop down could have many more custom type searches for exec different filtered searches.

      Any help would help for creating this. I originally tried creating a table to store the names of the different type searched but the table needed to be associated to another table. All I am looking for is a drop down to instruct the users as to which custom filter they can execute, and upon selecting a specific filter, would execute a script that I have created.








        • 1. Re: Reference Tables
          ninja
            

          howdy netguykb,

           

          have you considered a scripted "script-sorter"?

           

          you already have your scripts in mind...you just need to reference which one...

          Run an overarching script that goes something like:

           

          If [Choicefield="Account+newLead+LT10000"]

              Perform Script [Script 1]

          EndIf

          If [Choicefield="some other thing"]

              Perform Script [Other Script]

          Endif

          etc. etc.

           

          Rather than manage another table, you'll manage a script...

          Whaddya think?

           

          If you are totally sold on the related table method...why not relate the tables by using the Choice field?  When they make a choice and commit the record, the tables will become related...

          • 2. Re: Reference Tables
            davidanders
              

            White Paper for FMP Novices

            http://www.foundationdbs.com/downloads.html 

            • 3. Re: Reference Tables
              netguykb
                 Script sorter sound great however not sure how to create a script sorter. I am definately not interested in a related table, all I want is a dropdown with some selction choices and upon selecting I want to run scripts.
              • 4. Re: Reference Tables
                ninja
                  

                netguykb,

                I think perhaps I wasn't clear.  Use a script to sort between your scripts.

                 

                The script you could use might look something like:

                 

                If [Choicefield="Account+newLead+LT10000"]

                    Perform Script [Script 1]

                EndIf

                If [Choicefield="some other thing"]

                    Perform Script [Other Script]

                Endif

                etc. etc.

                 

                Step 1: Select a choice from the dropdown

                Step 2: hit the "go" button which runs the script.

                Step 3: the script (which I've called "scriptsorter" ) matches your dropdown choice with the proper other script to run.  The matching is coded into the script itself.

                Step 4: smile 'cause it works