That's an interesting problem.
How can I put that in words.....
First, you can hard-code a script that goes like:
If["Status (CurrentLayoutName) = "Data1"]
Go to Layout ["Data2"]
End If
If["Status (CurrentLayoutName) = "Data2"]
Go to Layout ["Data3"]
End If
If["Status (CurrentLayoutName) = "Data3"]
Go to Layout ["Data1"]
End If
That would work fine and you could script the reverse order too. Then you could place buttons on the layout to go to next and previous layouts, just like Steven said.
On the other hand it could be smarter to use a calculated field to specify the next layout number and script the process to go to the next layout. However, this brings up the possibility of the user scrolling to a layout that is not a data layout. So let's assume that all those non-data layouts are named beginning with a "-" eg. -PrintList.
You need a new field - a calculation field with a number result I will call layoutNext.cn:
= Status (CurrentLayoutNumber) + 1
The script to scroll forward through the layouts is:
If["layoutNext.cn > Status(CurrentLayoutCount)"]
Go to Layout ["true"]
Else
Go to Layout ["layoutNext.cn"]
End If
If [Left(Status(CurrentLayoutName), 1) = "-"]
Perform Script [Sub-scripts, "Scroll Layout Fwd"]
End If
To explain:
1. The first If statement tests if the currrent layout + 1 is more than the number of layouts that exist - if so, then go to the first layout (I have a field called true in my file that is a calculation with result = 1); if not, then go to the next layout number (defined by the field layoutNext.cn).
2. Second, when you get to that layout, the last If statement tests if the name of the layout begins with a - (i.e. it is a non-data layout as explained above). If so, it runs the whole script again. This would keep happening until it finds a layout that doesn't start with a - so make sure you have one!
And that's it. You could script the reverse using another calculated number field = Status (CurrentLayoutNumber) - 1.
Keep on FileMaking and credit to HD.
HTH
JW