3 Replies Latest reply on Sep 26, 2012 10:20 AM by philmodjunk

    Keeping a page section locked

    Annette

      Title

      Keeping a page section locked

      Post

            Hi all,

           I'm not sure how to explain what I'm looking to do but I would like to lock a certain part of the page, like a border on the left or the header, so that as you are scrolling down the screen it is still visible.  Is this possible in FM?

            

           Hope I'm explaining myself okay. 

            

           Thanks

           Annette

        • 1. Re: Keeping a page section locked
          philmodjunk

               If you place that section in the header part of your layout (you can drag the bottom border of the header down to resize it), and then select "list" view instead of "form" view, that part of your layout will stay put when you scoll the window vertically. If you don't want scrolling the window to scroll other records into view, you can isolate the current record as a found set of just that one records.

          • 2. Re: Keeping a page section locked
            Annette

                  Thanks for that.  But sorry, how do I get it to isolate only the current record so it doesn't scroll through all of the records?

            • 3. Re: Keeping a page section locked
              philmodjunk

                   You would need to perform a find for just the current record or omit all other records.

                   If you are working on a single user database file:

                   Show All Records
                   Omit Records
                   Show Only Omitted

                   will isolate the current record in a found set of just one record. In a shared database, a new record created by another user at just the wrong instant,  might creep in.

                   If you are working in a multi-user database file:

                   Set Variable [$ID ; YourTable::PrimaryKey]
                   Enter Find Mode [] ---> clear the pause check box
                   Set Field [ YourTable::PrimaryKey ; $ID ]
                   Perform Find []

                   Will isolate the current record. For "primaryKey", use the field in your table that uniquely identifies each record--most often this is an auto-entered serial number key.

                   The "fun" part to all this is if you still want to be able to click buttons to move forward and back through a set of records. You can add your own buttons for this in the header with a script that can do this--often with a found set of records on a layout based on a different occurrence of the same table. This allows you to pull up a found set that is independent of the found set on your current layout. Your scripts can switch to this other layout, move to the first, last, next or previous record in its found set and then use the primary key in a find or a relationship with Go To Related Records to bring up that record on your original layout.