WhereAreObjects ( )

Function stats

Average user rating
46
216
9999
Support
FileMaker 8.5 +
Date posted
20 April 2009
Last updated
21 April 2009
Version
Recursive function
No

Author Info
 Agnès

17 functions

Average Rating 4.6

author_avatar



 

Function overview

Prototype

WhereAreObjects  ( Layout )


Parameters

Layout  Get ( LayoutName ) or Name of Layout


Description

Tags:  Objects   Layout Objects   Layout   Custom List  

Returns the list of layout objects.
Returned elements by object are: name, type, source and position ( left and top )

A convenient function to locate objects on a Layout .

Examples

Sample input

WhereAreObjects ( Get ( LayoutName ) )


Sample output

1. Hello - rectangle | L : 393 | T : 274
2. a - tab panel | L : 424 | T : 291
3. a_1 - tab panel | L : 436 | T : 339
4. a_2 - tab panel | L : 436 | T : 339
5. a_3 - tab panel | L : 436 | T : 339
6. b - tab panel | L : 424 | T : 291
7. ct_Name - field TableC::Name | L : 460 | T : 357
8. c - tab panel | L : 424 | T : 291
9. c_1 - tab panel | L : 447 | T : 349
10. c_2 - tab panel | L : 447 | T : 349

 

Function code

/* WhereAreObjects ( Layout ) v2.1
WhereAreObjects () requires CustomList ( Start; End; Function )

//-------------------------------------------------------------------*/
// Agnès Barouh - Aout 2007 - Bugs / Corrections Report : barouh.agnes@wanadoo.fr
//-------------------------------------------------------------------*/

Let ([

$ObjList = LayoutObjectNames ( Get ( FileName ); Layout ) ;
$ObjTarget = CustomList ( 1; ValueCount ( $ObjList );
"Let ([ Value = GetValue ( $ObjList ; [n] ) ];
case ( Not IsEmpty ( GetLayoutObjectAttribute ( Value ; \"ObjectType\" )) ; Value ))")
];
CustomList ( 1; ValueCount ( $ObjTarget );
"Let ([ Value = GetValue ( $ObjTarget ; [n] ) ];
[n] & \". \" & Value & \" - \" & GetLayoutObjectAttribute ( Value ; \"ObjectType\" ) &
\" \" & GetLayoutObjectAttribute ( Value ; \"Source\" ) &
\" | L : \" & GetLayoutObjectAttribute ( Value ; \"Left\" ) &
\" | T : \" & GetLayoutObjectAttribute ( Value ; \"Top\" ))"
)
)

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

    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/216

    Prototype: WhereAreObjects( Layout )
    Function Author: Agnès (http://www.fmfunctions.com/mid/46)
    Last updated: 21 April 2009
    Version: 1.8

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