6 Replies Latest reply on Nov 23, 2014 9:56 AM by disabled_rosalie

    Navigation

      Hello everyone,

       

      Its me Rosalie, need some guidance from Pro's I have a navigation script below which Im using in my file for main navigation for desktop, now Im planning to use this in filemaker webdirect, Iphone & Ipad which I have a different layouts for each of them.

       

      How can I Include the following scripts so that it will automatically go to their respective layouts when Im using Desktop, iPad, iPhone or Webdirect

       

      Main Navigation Script

       

      If [Module=[“Home”]

      Go to Layout [“Dashboard” (Dashboard)]

      Else If [$Module = “Materials”]

      Perform Script [Authenticate Privilege]

      If [Get (ScriptResult)]

      Go to Layout [“Product Details” (Products)]

      Else

      Show Custom Dialog [“Sorry”, you do not have the privileges to product information.”]

      End If

      Else If [$Module = “Lab Hours”]

      Perform Script [Authenticate Privilege]

      If [Get (ScriptResult)]

      Go to Layout [“Lab Hours” (Time)]

      Else

      Show Custom Dialog [“Sorry”, you do not have the privileges to time information.”]

      End If

       

      Else If [$Module = “Invoices”]

      Perform Script [Authenticate Privilege]

      If [Get (ScriptResult)]

      Go to Layout [“Invoices Details” (Products)]

      Else

      Show Custom Dialog [“Sorry”, you do not have the privileges to Invoices information.”]

      End If

      Else If [$module =”Settings”]

      Go to Layout [“Settings” (Dashboard)]

      Else If [$module = “User”

      Perform Script [Authenticate Privilege]

      If [Get (ScriptResult)]

      Go To Layout [“User” (Users)]

      Install Menu Set [“User”]

      Perform Find [Restore]

      End If

      Else

      Show Custom Dialog [“Sorry”, you do not have the privileges to user information.”]

      End If

      Else If [$module = “Quit”

      Perform Script [“Log Out”]

       

      Sample of what I want to Include if Im on the Home Module

       

      If[$$PLATFORM = "Tablet"]

      Go to Layout ["Company Dashboard |iPad" (Dashboard)]

      Else If [$$PLATFORM = "Web"]

      Go to Layout ["Dashboard|Web (Dashboard)]

      Else If $$PLATFORM = "Desktop"]

      Go to Layout [Dashboard"(Dashboard)

      End If

       

      I tried to change the Go to Layout ("Dashboard" Dashboard) into perform script but its not working in webdirect.

       

      Any help is very much appreciated.

       

      Thank you so much.

       

      Rosalie

        • 1. Re: Navigation
          Mike_Mitchell

          Hello, Rosalie. The function you're looking for is Get ( ApplicationVersion ). You can populate your variable for user platform with that.

           

          HTH

           

          Mike

          • 2. Re: Navigation

            Thanks Mike, can you please show me hint how can I do that...just 15 days of filemakering.

             

            Thank you so much.

             

            Rosalie

            • 3. Re: Navigation
              Mike_Mitchell

              Sure. Assuming you have a script somewhere that uses a Set Variable step to set the value of $$PLATFORM, try this calculation:

               

              Let ( [

              appVer = Get ( ApplicationVersion )

              ] ;

               

               

              Case (

              PatternCount ( appVer ; "Pro" ) ; "Desktop" ;

              PatternCount ( appVer ; "Go_iPad" ) ; "Tablet" ;

              PatternCount ( appVer ; "Go" ) ; "iPhone" ;

              PatternCount ( appVer ; "Server" ) ; "Server" ;

              PatternCount ( appVer ; "Web" ) ; "Web" ;

              "Unknown"

               

               

              )

              )

              • 4. Re: Navigation

                Hi Mike,

                 

                Thank you so much.

                 

                Please correct me. below is my new script

                 

                Set Variable $$PLATFORM; Value Let ( [appVer = Get ( ApplicationVersion )

                ] ;

                 

                 

                Case (

                PatternCount ( appVer ; "Pro" ) ; "Desktop" ;

                PatternCount ( appVer ; "Go_iPad" ) ; "Tablet" ;

                PatternCount ( appVer ; "Go" ) ; "iPhone" ;

                PatternCount ( appVer ; "Server" ) ; "Server" ;

                PatternCount ( appVer ; "Web" ) ; "Web" ;

                "Unknown"

                 

                 

                )

                )

                 

                If [Module=[“Home”]

                            Perform Script (Go to Dashboard)

                Else If [$Module = “Materials”]

                         Perform Script [Authenticate Privilege]........

                 

                Go to Dashboard

                If[$$PLATFORM = "Tablet"]

                Go to Layout ["Company Dashboard |iPad" (Dashboard)]

                Else If [$$PLATFORM = "Web"]

                Go to Layout ["Dashboard|Web (Dashboard)]

                Else If $$PLATFORM = "Desktop"]

                Go to Layout [Dashboard"(Dashboard)

                End If

                 

                 

                Thanks Again..

                • 5. Re: Navigation
                  SteveMartino

                  For starters, there's a typo in you If/Else If statement.  The If refers to Module, and Else If refers to $Module. It could just be a typo here and not in your script.

                  I assume somewhere earlier in the script you set this variable.

                  • 6. Re: Navigation

                    Thanks Steve,

                     

                    I will put that also in the first part of my script.