2 Replies Latest reply on Aug 25, 2010 4:52 AM by sunmoonstar.13

    List  View sorting A words, then B words, etc.

    rjlevesque

      Title

      List  View sorting A words, then B words, etc.

      Post

      Working on a font database, I want to show all A fonts in a list view, then B fonts, etc. I have seperate layouts for each. I need the user to click a button to open the layout and it display only the A fonts or B fonts, etc. What is the best method to do this? Should I go in a different direction here?

        • 1. Re: List  View sorting A words, then B words, etc.
          LaRetta_1

          I'm unsure of your structure but consider this:

          You need a calculation of the font name which would be:  Left ( fontname ; 1 )

          But what version of FM are you using?  If vs. 11, you can simply use filtered portals.  Even tabs might be better approach.  When you say layouts, is the data in the same table?  What appears on the layouts that you would need a layout for every font instead of simply changing the data that is displayed when you select a font?

          • 2. Re: List  View sorting A words, then B words, etc.
            sunmoonstar.13

            Here's one possible solution that uses a single layout:

            On your List View layout, create a row of buttons in the header part of the layout and label them A, B, C, D ... X, Y, Z.

            Attach the following script to each button:

            Set Variable [ $_letter ; "==" & Get ( ScriptParameter ) & "*" ]
            Perform Find [Restore]
              // use the variable $_letter as the find criteria

            Then assign a Script Parameter to each corresponding button: "A", "B", "C", etc

            Then, when you click a button, it will find all the fonts starting with that letter.

             

            Nick