Release 10.1A: OpenEdge Development:
ADM and SmartObjects

> ## Functions for accessing properties

> The following property functions are useful for accessing SmartObject properties from application code:

> - The `assignLinkProperty` function sets a property value in one or more objects at the other end of the specified link. It is defined as follows:

>     assignLinkProperty RETURNS LOGICAL
>       (pcLink AS CHARACTER, pcPropName AS CHARACTER,
>        pcPropValue AS CHARACTER):

> For example, the following code in a SmartDataObject uses `assignLinkProperty` to set the `DataModified` property to `yes` in all its Data-Targets:

>     DYNAMIC-FUNCTION(‘assignLinkProperty’:U,
>       INPUT "DATA-TARGET":U,
>       INPUT "DataModified":U,
>       INPUT "yes":U).

> - The `linkProperty` function returns the value of the specified property in the single object at the other end of the specified link. It is defined as follows:

>     linkProperty RETURNS CHARACTER
>       (pcLink AS CHARACTER, pcPropName AS CHARACTER):

> For example, the following code in a visual object (a SmartDataViewer or a SmartDataBrowser) uses `linkProperty` to get the current page of the object’s container:

>     iCurrentPage = DYNAMIC-FUNCTION(‘linkProperty’:U,
>       INPUT "CONTAINER-SOURCE":U,
>       INPUT "CurrentPage":U).

> - The `propertyType` function returns the data type of the specified property. It is defined as follows:

>     propertyType RETURNS CHARACTER
>       (pcPropName AS CHARACTER):

> For example, the following code in a SmartDataObject gets the data type of its `DataQueryBrowsed` property:

>     cDataType = DYNAMIC-FUNCTION(‘propertyType’:U IN h_dcustomer,
>       INPUT "DataQueryBrowsed":U).

> This function returns data types only for properties for which a `set` `propname` function is defined.

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095