2 Replies Latest reply on Nov 19, 2012 8:32 AM by ClayReed

    Script Help



      Script Help


           I have a filemaker file that is from the starter solution named "Assets" and I am trying to modify this layout. Currently when the "Sort Selection" list is selected "Status",   "Item" and "category" are displayed and when one is selected the summary report sorts based on the selection. The trigger script is shown. Currently every asset is assigned to a brand and there are about 20 brands. What I want to do is first select the "Sort Brand" drop down selecting a brand name and then "sort selection" would sort based on that selection. I am assuming that I would need a trigger script for the "Sort Brand" drop down. Any help would be greatly appreciated.


        • 1. Re: Script Help

               In sort selection, you are selecting a field (column) on which to sort your records. Yet from your description, "Brand" is one field in which their can be "about 20 brands". That sounds like a find, rather than a sort. If you select "Brand A" do you only want records with "Brand A" in the Brand field to appear on the layout?

               If so,

               Make Sort Brand a global text field. (Global storage is a field option you can select in Manage | database | fields.)

               Use this script:

               Enter Find Mode []-->clear the pause check box
               Set Field [Assets::Brand ; Assets::Sort brand ] --> this step will not work unless Sort Brand has global storage specified.
               Set Error Capture [on]
               Perform Find []

               Perhaps "select brand" would be a better name for this.

          • 2. Re: Script Help

                 Thanks Phil. this worked perfectly!!