4 Replies Latest reply on Aug 10, 2015 2:45 PM by EricHamberger

    Variable Layout Name by Calculation?



      Variable Layout Name by Calculation?


      FM Pro10, Windows XP, Hosted Network, always learning.:smileywink:


      I want to be able to go back to the layout I came from, and some areas of my interface are accessed from a few different layouts.


      I have tried doing it with global variables, as they are stored while the file is open and should work across more than one script.


      i.e. button setup: perform script

      SetVariable[$$layout_from; Value:Get(LayoutName)]

      Go to Layout(by name) [wherever_i'm_going]


      and the return to layout in a different script:

      Go to Layout(by calculation) [$$layout_from]


      However this hasn't worked. I'm not very experienced with variables, so if someone can see what I'm doing wrong I'd appreciate a clue.


        • 1. Re: Variable Layout Name by Calculation?
          Steve Wright

          Should be working, its how I do it in my solution.


          Make sure, on the Go to Layout script step that you are choosing  'Layout Name by calculation'  and not layout number by calculation.


          Ive been caught out by this once or twice. 

          • 2. Re: Variable Layout Name by Calculation?
               :smileysurprised:That's exactly what I did wrong, thankyou for your help.
            • 3. Re: Variable Layout Name by Calculation?

              hi, i'm new in file maker and i whis i can have a clear example how to decrare a global variable regarding your issue, i want to go back to the layout i cam from.

              hope you can guidme on this one.


              • 4. Re: Variable Layout Name by Calculation?

                I am having the same issue, but I have the layout name by calculation selected.  I have a trigger on every layout that triggers on layout exit that sets a global field called $$departedlayout I'd like to have a "back button" that goes back to the last layout you were on.  I have a text field that displays the global variable properly, but when I set it to a button with the script step GoToLayout(Name by Calculation) I get error 105 when I put the global variable in the calculation box.  If I simply type the layout name in the calculation box, it works. I thought it might be because there isn't quotes, but concenating quotes around the variable doesn't help either. I can't think of any other ideas.