GetHiddenObjects ( )

Function stats

Average user rating
5.0000
464
369
9999
Support
FileMaker 10.0 +
Date posted
27 August 2014
Last updated
09 September 2014
Version
Recursive function
Yes

Author Info
 Kim Berthonneau

1 functions

Average Rating 5.0

author_avatar



 

Function overview

Prototype

GetHiddenObjects  ( LayoutObjectsNames )


Parameters

LayoutObjectsNames  OPTIONNAL - Return-delimited list of object names to be tested. If leaved empty, return a list of all hidden objects names for the current Layout.


Description

Tags:  List   Layout Objects   Layout   Interface   FileMaker Missing Native Function   Dev   Design   Debug  

Use this function in a DataViewer, a showCustomDialog or wherever you want to get a return-delimited list of all hidden objects names that are on your currently browsed layout.

Parameter :
- OPTIONNAL : LayoutObjectsName : Return-delimited list of object names to be tested. If leaved empty, return a list of all hidden objects names for the current Layout.

Limits :
- Recursive function, so theoretically limited to 10.000 named objects... Easy :).
- Due to GetLayoutObjectAttribute, it is limited to the layout currentlys browsed.
- Hidden objects appears with FileMaker Pro 13, so you can guess with wich FileMaker Pro version is this custom function compatible.

Examples

Sample input

GetHiddenObjects ("")


Sample output

"HiddenObject1¶HiddenObject2¶HiddenObject3¶"

 

Function code

/*

GetHiddenObjects ( LayoutObjectsNames )
by Kim Berthonneau, BH&A - Direct Impact
www.bh-a.com, www.directimpact.ca

v.1.1 - September 8, 2014
- Version history added
- Bug when there is an empty ObjectLayoutName corrected
----------
v.1.0 - August 12, 2014

Type "--help" in parameter to get help.
Type "--version" in parameter to get version history.

*/


Case (

// Help command :
LayoutObjectsNames = "--help";
" Description:¶
Use this function in a DataViewer, a showCustomDialog or wherever you want to get a return-delimited list of all hidden objects names that are on your currently browsed layout.¶¶

Parameter :¶
- OPTIONNAL : LayoutObjectsName : Return-delimited list of object names to be tested. If leaved empty, return a list of all hidden objects names for the current Layout.¶¶

Example :¶
- Input :¶
GetHiddenObjects (\"\")¶
- Output :¶
\"HiddenObject1\¶
HiddenObject2\¶
HiddenObject3\¶\"¶¶

Limits :¶
- Recursive function, so theoretically limited to 10.000 named objects... Easy :).¶
- Due to GetLayoutObjectAttribute, it is limited to the layout currentlys browsed¶
- Hidden objects appears with FileMaker Pro 13, so you can guess with wich FileMaker Pro version is this function compatible or not"
;
// Version history :
LayoutObjectsNames = "--version";
"v.1.1 - September 8, 2014¶
- Version history added¶
- Bug when there is an empty ObjectLayoutName corrected¶
¶----------¶
v.1.0 - August 12, 2014";

// Real function :
Let ([
    // Get the Layout Objects Name List
    $objList = Case ( IsEmpty (LayoutObjectsNames) ; LayoutObjectNames ( Get (FileName) ; Get (LayoutName) ) ; LayoutObjectsNames );

    // Get the Last Object of the List
    $objLast = GetValue( $objList ; ValueCount($objList) );
    $objLast = Case ( IsEmpty ( $objLast ) ; " " ; $objLast);

    // Verify if this object is Hidden
    $isHidden = GetLayoutObjectAttribute ( $objLast ; "isobjecthidden" );

    // If this object is hidden prepare it and add it to the Stack
    $putInStack = Case ($isHidden ; $objLast & "¶" ; "");

    // Add to Stack
    $Stack = Case ( IsEmpty ( $Stack ) ; $putInStack ; $Stack & $putInStack );

    // Prepare and CallBack function
    $objListWoLast = Left ($objList ; Length ($objList) - Length ($objLast));
    $result = Case (IsEmpty ( $objListWoLast ) ; $Stack ; GetHiddenObjects($objListWoLast) )
];
$result
&
// Free Variables
Let ([$Stack = "" ; $result = "" ; $objList = "" ; $objListWoLast = ""] ; "")
))

// ===================================
/*

    This function is published on FileMaker Custom Functions
    to check for updates and provide feedback and bug reports
    please visit http://www.fmfunctions.com/fid/369

    Prototype: GetHiddenObjects( LayoutObjectsNames )
    Function Author: Kim Berthonneau (http://www.fmfunctions.com/mid/464)
    Last updated: 09 September 2014
    Version: 1.4

*/
// ===================================

 

 

 

 

 

 

 

Top Tags

Text Parsing  (33)
List  (32)
Date  (28)
XML  (26)
Format  (23)
Sql  (22)
Dev  (20)
Debug  (17)
Layout  (15)
Interface  (15)
Text  (14)
Variables  (12)
Filter  (11)
Layout Objects  (11)
Design  (10)
Array  (8)