Thank you for this David,
out of curiosity, how do you install them? I've never downloaded any plug-ins or add-ons for FMP12.. i have a man and have downloaded the file but all it seems to do is bring up a little box that esstnially shows you how it works.. have I actually installed it now?
You will need to set your variable $$PrevLayout to another Variable such as $Prev in your back button then use $prev in your go to Layout [$Prev]..
The exit trigger is firing after you enter the new layout so it reset to itself, so if you set the variable to something else before it reset it will work.
Here is a sample app
Hi all, I still seem to be struggling with this so I thought I'd write out the steps I followed and see if you can spot where I'm going wrong...
Right click the button in the edit layout mode and enter the 'Button Set-up' window
In the button set-up window I choose GO TO LAYOUT in the left-hand column and then on the right-hand column, in the Specify Option drop down, I choose LAYOUT NAME BY CALCULATION
When the SPECIFY CALCULATION box appears, in the lower calculation field i have typed "$$Prev"
I then press OK, return to the Button Set-Up window and press OK again.
I click FILE - MANAGE - LAYOUTS
When the MANAGE LAYOUTS window opens, I click the EDIT button on the 1st of my 4 layouts.
When the LAYOUT SETUP window pops up, I click the Script Triggers Tab.
In the EVENT section, I scroll down to OnLayoutExit and TICK that option.
Next, I click the SELECT button and i get the SPECIFY SCRIPT window pop up.
Here, I add a new script and in the EDIT SCRIP window that pops up, I scroll to the SET VARIABLE option in the left-hand column, MOVE it over to the right hand side and then click the SPECIFY button.
Next, when the "Set Variable" options window pops up, in the NAME: section i have typed "$$Prev"
Then in the VALUE: section, I press the SPECIFY button and bring up the SPECIFY CALCULATION window.
I then typed "Get (LayoutName)" in the bottom section and then press OK
Then I return to the "Set Variable" Options window and again I just press OK
Finally, I return to the Edit Script Window and again press OK
(Now, the calculation in the EDIT SCRIPT window reads… "Set Variable [$$Prev; Value:Get (LayoutName)] - is this correct?)
Lastly I added the the scrip to each of the 4 layouts that I've got.
Is this correct or am I misinterpreting somthing?
Set a script trigger on each layout OnLayoutExit to preform a script the following 1 line script
Create a back button with a script with the following 2 line script
go to Layout[$Back]
I used $Prev as example but when I created the sample app I used $Back. It don't matter which you use. This variable doesn't have to be global. the variable used in the OnLayoutExit is the only one that need to be global.
You can import these script from the sample app.
Ok something is going pretty badly here becase I just can't get this working at all... would I be able to email someone my file so they can see what i'm doing wrong?
I just can't seem to get my head around this and see what's going wrong.