6 Replies Latest reply on Jan 22, 2009 8:27 AM by TSGal

    Hilite Script

    ianim8

      Title

      Hilite Script

      Post

      Im trying to edit the Asset Management template in the List View.

      I would like to make my own Hilite and Sort from columns created originally in Excel.

      I finally figured out the Sort but it doesnt seem to toggle back from Ascending to Descending.

      Only works at the first hit (Ascending).

      Also where do you create the Hilite script e.g. HiliteItem.

      I cant find that in the ScriptMaker?
      Thanks in advance :)

       

       

        • 1. Re: Hilite Script
          TSGal

          ianim8:

           

          Thank you for your post.

           

          I just opened an Asset Management template.  The sort should work between Ascending to Descending.  If it is only working the first hit, then HilteSortedBy field is never set to "ItemD".

           

          HiliteItem is referenced in "Sort by Item Ascending" and "Sort by Item Descending".  Is this what you mean?

           

          TSGal

          FileMaker, Inc. 

          • 2. Re: Hilite Script
            santiae
               thanks for the reply. basically I have new records in addition to "Item", "Category" and "Serial Number". I added "Manufacturer". Id like to have that in the list option and be able to sort. I tried making a Sort by Manufacturer and no go :( cant I just copy HiliteItem and rename as HiliteManufacturer and change the criteria to sort by manufacturer?
            • 3. Re: Hilite Script
              TSGal

              santiae:

               

              Thank you for the additional post.

               

              Yes, you should be able to duplicate the HilteItem field and change the formula to what you want.  For example,

               

              Case (HiliteSortedBy = "manufacturerA"; GetRepetition(HiliteLibrary: 1);

                 HiliteSoprtedBy = "manufacturerD"; GetRepetition(HiliteLibrary; 2);

                 "")

               

              What is occurring?  That is, what isn't working?

               

              TSGal

              FileMaker, Inc. 

              • 4. Re: Hilite Script
                santiae
                   Sorry for the late reply. Yes I have duplicated the working HiliteItem in Manage Database > Fields. This is the only place I can find and edit a Hilite script. I switched the word "item" with "manufacturer". Named the script "HiliteManufacturer". I checked everything between both and they have the same attributes. The item Im applying this to is the "Hi" box or button in the List View. I just changed the original column from Model to Manufacturer. I can get the Manufacturer to list properly, however with the above edits to the "Hi" box/button. The first click sorts it from A - Z but the second click nothing happens. Again Id like to continue using these steps with other new columns that Ive created. Thanks for helping :)
                • 5. Re: Hilite Script
                  santiae
                     Ugh I think my problem is worse than I thought. Its not just the "Hi" box/button but the whole enchilada :P With the original Asset Management you get Sort by Item, Sort by Model, Sort by Category and Sort by Serial Number. They all have a few scripts attached to their functions which is where I lack knowledge :( Is there step by step so that I can make/edit my own Sort statements? If I can get one done then Im sure I can figure it out for the rest :) Thanks!
                  • 6. Re: Hilite Script
                    TSGal

                    santiae:

                     

                    Thanks for the additional information.

                     

                    You need to start somewhere with scripts, so I guess it is now.  :-)

                     

                    Seriously, pull down the Scripts menu and select "Manage Scripts".  This will give you a listing of all the scripts associated with this database.  Don't be intimidated by the number of scripts.  Each one has a specific function.

                     

                    Go down halfway and double-click "Sort by Category Ascending".  This will open a new dialog box.  On the left side are all the different script steps that can be used.  On the right side are the actual script steps used, and you will see three steps.

                     

                    Highlight the first script step:

                    Set Field [Asset Management::HiliteSortedBy; "categoryA" ]

                     

                    This script step sets the field HiliteSortedBy in the Asset Management table to the value "categoryA".  You can click the "Specify..." buttons to see what is occurring.  Once inside, click on "Cancel" to not make any changes.

                     

                    Highlight the second step:

                    Sort Records [Restore; No dialog ]

                     

                    This script step restores a saved sort order and sorts the records.  When you usually perform a sort, it brings up a dialog box.  This is suppressed because you'll notice at the bottom the option is checked for "Perform without dialog".  Click on "Specify..." to see the saved sort order.  You'll see the sort order is set to Category ascending followed by Item ascending.

                     

                    Highlight the third step:

                    Go to Record/Request/Page [First]

                     

                    After a sort, you may not be at the first record.  This step puts the first record of the sort active.

                     

                    If you close this and go to the next step, "Sort by Category Descending", you'll see it is very familiar to the previous script.  If you look at the Sort Records script step (second step), you'll see the sort order has changed to Category DESCENDING followed by Item ascending.

                     

                    I'm hoping this will get you started.  If you run into any difficulty creating your own scripts, let me know.

                     

                    TSGal

                    FileMaker, Inc.