Brian Dunning's FileMaker Custom Functions

NamedLayoutObjects ( Layout )

Returns a clean, sorted list of named layout objects for a given layout

  Average rating: 5.0 (1 vote) Log in to vote

Ibrahim Bittar Torres   Ibrahim Bittar Torres - Show more from this author
Eikonsys, S.A. de C.V.
http://www.eikonsys.com

Share on Facebook Share on Twitter

  Sample input:
NamedLayoutObjects ( Get ( LayoutName ) )
  Sample output:
1
Addenda_01
Addenda_02
Addenda_03
Addenda_04
Addenda_05
Addenda_06
Addenda_07
Addenda_08
Addenda_09
Addenda_10
Addenda_11
Addenda_12
Addenda_13
Addenda_14
Addenda_15
Addenda_16
Addenda_17
Addenda_18
Addenda_19
Addenda_20
Addenda_21
Addenda_22
Addenda_23
Addenda_24
Addenda_25
Addenda_26
Addenda_27
Addenda_28
Addendas
Addendas.PortalFilter
AddendasPopover
Addresses
Addresses.PortalFilter
AddressesPopover
AssignedSalespeople
AssignedSalespeople.PortalFilter
AssignedSalespeoplePopover
BankAccountNumber
BankName
BanksTaxIDCatalog
BanksTaxIDCatalog.PortalFilter
BanksTaxIDCatalogPopover
CFDiUse
CFDiUse.PortalFilter
CFDiUsePopover
CollectionContacts
CollectionContacts.PortalFilter
CollectionContactsPopover
CommissionTypes
CommissionTypes.PortalFilter
CommissionTypesPopover
Customers.Activities
Customers.Activities 2
Customers.Activities.Portalfilter
Customers.Activities.Tab
Customers.AddendaID
Customers.Addresses
Customers.AssignedSalespeople
Customers.Brands
Customers.Comm
Customers.Contacts
Customers.Contacts.All
Customers.Contacts.Portalfilter
Customers.Contacts.Tab
Customers.Credit.ElectronicInvoicing.Tab
Customers.Credit.General.Tab
Customers.Credit.Tab
Customers.Invoices.Portalfilter
Customers.Invoices.Tab
Customers.Jobs
Customers.Jobs.Portalfilter
Customers.Jobs.Tab
Customers.JoinAddresses
Customers.Marketing.Tab
Customers.Quotes
Customers.Quotes.Portalfilter
Customers.Quotes.Tab
Customers.Slips
Customers.Slips 2
Customers.Slips.Portalfilter
Customers.Slips.Tab
Customers.SpecialPrices
Customers.SpecialPrices.Add
Customers.SpecialPrices.Portalfilter
Customers.SpecialPrices.Tab
Customers.Summary.Tab
DeliveryTypes
DeliveryTypes.PortalFilter
DeliveryTypesPopover
JumpToRecord.PortalList
JumpToRecord.PortalList.PortalFilter
Lock_Closed
Lock_Open
Menubar.Off.Bar
Menubar.Off.Icon
Menubar.On
Menubar.On Copy 2
Modules
Modules.PortalFilter
PaymentForms
PaymentForms.PortalFilter
PaymentFormsPopover
RevertButton
SalesCategories
SalesCategories.PortalFilter
SalesCategoriesPopover
SalesCategoryField
ShippingVendorField
ShippingVendorPopover
ShippingVendors
ShippingVendors.PortalFilter
Toolbar
Users.AccessAndSecurity.Button
Users.Comments.Button
Users.PayrollInfo.Button
ZZZ.UserInfo

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

FileMaker already comes with a function called "LayoutObjectNames", which returns a list of all named layout objects, however, this list is messy, filled with "<", ">" and empty lines.

The idea of this custom function is to automate the cleanup of this list in order to make it usable for calculations or script loops.

For example, if you're developing something for WebDirect, you should have noticed that when you use Refresh Window, WebDirect redraws ALL the layout objects (one by one) and it looks horrible and unprofessional. What if you name your objects and add a ".WD" suffix?, so you can find them in your layout with this custom function and then refresh them individually.

You'll be amazed with the results: ZERO screen redraw.

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 15 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: