Progress
ADM 2 Guide
Using Data SmartLinks
Data in the form of field values is passed from one SmartObject to another using a Data SmartLink. A SmartDataObject can be a Data–Source for another object. It can also be a Data–Target, receiving a key value from another query object to use in opening a query. Visual objects such as SmartDataBrowsers and SmartDataViewers can also be Data–Targets. A SmartDataViewer as a Data–Target receives formatted column values from a SmartDataObject for display. A SmartDataBrowser as a Data–Target browses its Data–Source’s query and displays column values.
At design time, when you drop a SmartObject into an application, the AppBuilder’s Link Advisor assesses each SmartObject already in the application to determine whether it is suitable for a Data link connection with the new SmartObject and, if it is, it recommends the connection. It makes its assessment by examining the properties of each object to determine what columns it defines: a query object can be a Data–Source for another object only if it can supply one or more columns that the object could use as a key to open its own query. In particular:
- A query object can be a Data–Source for a visual object such as a SmartDataViewer if all of the fields displayed by the SmartDataViewer are in the query object and all fields that are enabled in the SmartDataViewer are updateable in the Data–source.
NOTE: Because of the flexibility of SmartObject combinations and the dynamic nature of queries, the Link Advisor might suggest links that are not desirable for your application. Always examine the Link Advisor’s recommendations before accepting them. One way to avoid problems is to drop Data–Sources onto the design window before Data–Targets. When two objects can be linked in either direction, the Link Advisor assumes that the first object dropped into the application is the Data–Source.- A SmartDataBrowser can be a Data–Target only for a SmartDataObject that has the same signature. For more information on signatures, see the "Compatibility Checking" section of Data Management in the ADM."
When you are linking two query objects, you can use the SmartDatObject’s ForeignFields property at design time to designate which of its fields to use as foreign key fields in SmartDataObjects that are subordinate to it. A corresponding property called ForeignValues holds the values of those fields for the current row. For details, see the "Initializing the Foreign Key Fields" section in Data Management in the ADM."
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |