0 Replies Latest reply on Mar 26, 2017 1:09 PM by user28271

    Browser Nav Issue

    user28271

      Previously I shared my use of the  FM solution available for free online called Browser Nav.

       

      Most of the time it work fine, but in some situation it does not and I am at a loss as to why.

       

      I have tracked it down to LAYOUT No.  For some reason it will occasionally post the wrong Layout No.  Currently I have a Layout No 88 which Browser Nav insist is Layout 199.

       

      Any thought would be appreciated.

       

      Here is a link to the FM file:

       

      http://www.modularfilemaker.org/module/browser-navigation/

       

      Here is is the Custom Function it uses:

       

      Let([

       

       

      ~lno = Get ( LayoutNumber )  ;

      ~lName = Get( LayoutName ) ;

      ~different = LeftWords( GetValue( $$BrowserNav.Layout.backward  ; 1 ) ;  1 )   ≠  ~lno ;

       

       

      $$BrowserNav.Layout.backward  =

      Case(

      $$BrowserNav.SaveDisabled ; $$BrowserNav.Layout.backward ;

      IsEmpty( $$BrowserNav.Layout.backward ) ; ~lno & " " & ~lName ;

      ~different = True ; ~lno & " " & ~lName  & ¶  & $$BrowserNav.Layout.backward ;

      $$BrowserNav.Layout.backward

      ) ;

       

       

      $$BrowserNav.Layout.forward =

      Case(

      $$BrowserNav.SaveDisabled ; $$BrowserNav.Layout.forward ;

      ~different ; "" ;

      $$BrowserNav.Layout.forward

      ) ;

       

       

      $BrowserNav.BackID = LeftWords( GetValue( $$BrowserNav.Layout.backward ; 2 ) ; 1 ) ;

      $BrowserNav.BackName = MiddleWords( GetValue( $$BrowserNav.Layout.backward ; 2 ) ; 2 ; 99 ) ;

       

       

      $BrowserNav.NextID = LeftWords( GetValue( $$BrowserNav.Layout.backward ; 1  ) ;1 ) ;

      $BrowserNav.NextName = MiddleWords( GetValue( $$BrowserNav.Layout.backward ; 2  ) ; 2 ; 99 ) ;

       

       

      $$BrowserNav.NavBackTip =  If( IsEmpty( $BrowserNav.BackID ) ; "Nowhere to go" ;  $BrowserNav.BackName) ;

       

       

      $$BrowserNav.NavNextTip =    If( IsEmpty( $BrowserNav.NextID ) ; "Nowhere to go" ; $BrowserNav.NextName)

       

       

      ];

       

       

      True

      )