This topic contains 1 reply, has 2 voices, and was last updated by  admin 8 years, 2 months ago.

  • Author
    Posts
  • #73331

    master
    Participant

     

    When I set the url of the web browser a new set of data is loaded into cache according to the $$hash included in the url. As I move to another date, the data is refreshed only when the date is outside the cached data. This is all great.

    However, if I leave the calendar layout and return then the data refreshes according to the original $$hash. So even though I moved to another date before leaving the calendar, when I return to the calendar layout the refresh takes me to the original date. This can be disconcerting to a user who expects the calendar to stick to the date they were viewing when they were last on the calendar layout.

    I am hoping to find a way to stay on the date last selected by the user. I know I could open the calendar in a new window that stays open in the background, but I am hoping to avoid that. One solution would be to reset the $$hash using an onLayoutExit trigger, but for that I need a way to determine what date the user is currently viewing. Is there any method to query the calendar for the date shown above the calendar?

    Thanks

  • #73332

    admin
    Keymaster

    As you said, the easy way around this is multiple windows.

    Depending on the platform and version of FileMaker, you can frequently get the current hash by

    getlayoutobject($$calendar_object;”source”)

    This will report the current URL in the web viewer. Everything to the right of the “#” character is the $$hash.

    Let (

    _url =GetLayoutObjectAttribute ( $$calendar_object;”source” );

    If (PatternCount (_url;”#”)>0;Right (_url;Length (_url) – Position (_url;”#”;1;1) + 1);$$hash)

    )

    We have an example of this in soSIMPLE Calendar file: script “Calendar Save $$Hash”.

    Although soSIMPLE constantly keeps the current URL updated as you navigate the calendar, some versions of FileMaker Pro & Go don’t report changes to the URL accurately. I don’t have a current list of which versions do and which don’t.

    If this is not an option, and a second window is not an option, there are still other options – either using the MBS plugin to query the web viewer, or having soSIMPLE trigger a (background) script to update the $$hash every time you navigate anywhere. These last couple of options, however, are a bit more complicated, and may require a development fee.

    Let me know if these options work for you, or if you’d like to look into the other options.

    Thanks.

     

You must be logged in to reply to this topic.