Get Front Tab Names With Out Recursion

April 4, 2011 / By: Todd Geist / FileMaker

For years I have been using a recursive custom function to get a list of all the Selected Tab Panels on a layout.  This works quite well, but in my current project I wanted to get rid of all custom functions. I didn’t really want to use a looping script. I wanted a pure calculation that could do it.  This is what I came up with.

---------------------------------------------
Evaluate("List(¶"  &
Let(
[
left =  "Let([tab = "";
right = ""];Case(GetLayoutObjectAttribute ( tab ; "isFrontTabPanel" ) ; tab;""));";
tabs = Substitute(
  LayoutObjectNames ( Get( FileName ); Get( LayoutName ) );
  ["<¶";""];
  [">¶";""];
  [">";""]
)
];
left &

Substitute(
   tabs;
   "¶"; right & "¶" & left
) &
right
)
&"¶)"
)
---------------------------------------------

This seems to work pretty well.

Apologies, the download file has gone missing.

 

Talk to us

Recent Posts

RECEIVE THE OCCASIONAL UPDATE.

NEW PROJECT OR COLLABORATION?

Drop us a line at info@proofgeist.com, we’ll answer.

FOLLOW US.

© 2023 Proof+GEIST All Rights Reserved