Simplicty and flexibility!


Function::Internal

DoesObjectExist
DoesObjectExist("ObjectName")
DoesObjectExist("CustomerName")
if (DoesObjectExist("MyObjectName")>0,"Yes","No")
NumberOfObjects := DoesObjectExist("ObjectName") .
DoesObjectExist(concat("MyObject#",GetCurrent("RowNumber"))


To check if an object is available in the current form or to find the number of objects with the same name.

When you use a subform or a multi-record form the object names are cloned so if you have 40 rows in a subform you will have 40 object clones with the same name. If you want to manipulate or populate them all you need to loop through them, so it will be useful to know how many clones of the object there is.

Another use is to check if a specific clone exist for instance nr. 13. DoesObjectExist("CustomerName#13").

Parameters


ObjectName: String

Object to query for.

Returns/Result


The nuumber of object with this name in the current document. 0 is none, 1,2,3 etc.

Examples


Reference

See Also


On the forum about DoesObjectExist

On the blog about DoesObjectExist


dg3_HelpView