Results 1 to 5 of 5

Thread: Previous page

  1. #1
    Join Date
    Oct 2003
    Location
    New York, NY
    Posts
    2

    Question Unanswered: Previous page

    I want to be able to dynamicly go back to the last page.

    I thought using "status(CurrentLayoutNumber)" and using a repeating field to search for the 2nd to last number. This doesn't seem to work.

    Any ideas? Thanks!


    W

  2. #2
    Join Date
    Sep 2003
    Location
    Cincinnati, Oh USA
    Posts
    203

    Re: Previous page

    Nothing's dynamic in FileMaker. What you can do is use a script and use the "Go to Record/Request/Page" function (go to page 'last'). Now it's just a matter of how you want to trigger the script. A button is the most convient way. OR do you want to go to last page on open?.


    Originally posted by waddi
    I want to be able to dynamicly go back to the last page.

    I thought using "status(CurrentLayoutNumber)" and using a repeating field to search for the 2nd to last number. This doesn't seem to work.

    Any ideas? Thanks!


    W

  3. #3
    Join Date
    Oct 2003
    Location
    New York, NY
    Posts
    2

    Post continued

    This only works if the last page was in the same Layout. In this case, I need to be able to go back and pull up the last viewed layout.

    Thanks! W

  4. #4
    Join Date
    Sep 2003
    Location
    Cincinnati, Oh USA
    Posts
    203

    Question Re: continued

    Last viewed in the same db? or last viewed in Related record?

    Originally posted by waddi
    This only works if the last page was in the same Layout. In this case, I need to be able to go back and pull up the last viewed layout.

    Thanks! W

  5. #5
    Join Date
    Sep 2003
    Location
    San Francisco
    Posts
    70
    This is a very tedious task. You need a global text field that will retain the history of files you've been in, and another that will retain the history of the layout numbers you've bee on. Lets call them gHistoryFile and gHistoryLayout.

    Each time the user navigates to another layout, you must trigger a script that will "push" the filename status(currentfilename) and the layout number status(currentlayoutnumber) to the respective fields. Something like:
    Set Field[gHistoryFile, "status(currentfilename) & "" & gHistoryFile]
    Set Field[gHistoryLayout, "status(currentfilename) & "" & gHistoryLayout]

    Then, when you want to go back, you have to "pop" the top line from each field and load it into another global. You must actually "pop" or remove the top line of the file, and not just read it.

    Once you've popped the top line and stored the values in globals, you have to run a script in a master file somewhere that has a series of If/Else statements checking for filename:

    If [gFileName = "test.fp5"]
    ...perform script [external, test.fp5, myGoToLayoutScript]
    Else
    ...If [gFileName = "other.fp5"]
    ......perform script [external, other.fp5, myGoToLayoutScript]
    ...Else
    ......If [gFileName = "....."]
    .........
    ......End
    ...End
    End

    Obviously this can get very long if you have a lot of files. Each file must have a "myGoToLayoutScript" (you should name it more appropriately, though). That script will have a simple go to layout [by Field Value] step, where the field is the global that contains the top line of the gHistoryLayout field that you popped earlier.

    That's pretty much it. The biggest problem is that you *must* script all navigation, or else the history will be inconsistent.

    Good luck!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •