Data Sources are Object Modeller configured collections of data. This Help Resource discusses the Association type of Data Source, following on from the basic Object Type Data source. We recommend that you familiarise yourself with the Object type Data before reading this Help Resource.
The Associations type of Data Source follows Associations, starting at one object type, to return data about an associated Object Type.
The first difference this type of data source presents, compared to the basic Objects by Type Data Source, is the requirement to configure a selected starting point for the data source. For example, if we wanted to list out all of the contacts that are interested in a certain Book, we would set up the data source to start with Object Type "Book" and follow the Association "Is Interested In" to the object type "Contact".
This would be the path that the Data source will follow BUT it also need to know where to start from. We call this the "Source Object" - which is introduced on this Data Source type.
There are six System Variables provided for you to select from, to configure the Source Object for this type of Data source. (You can also add your own). These system variables are;
For this Help resource we are concentrating on the ParentObject source object.
ParentObject - This option tells the data source that the starting point (root) of the data source will be a selected Object instance (not an Object type but an actual object from your XPOR). This source type is selected by default, when configuring a Data source through Modeller, with the option as "XPOR Object". This will allow you to complete the configuration of your data source - and use it to create a Grid form - and add it to a web page. It is at this point that XPOR will ask you to select the starting point object
In the case of the BOOK and people who are interested in it (exampled above), the Form configuration on the web page will allow the editor to select a specific Book object as the starting point for the data source. For example if we had "Lord of the Rings" as an object in our system and four people had registered interest in that Book;
To get these to list in a grid, we make a data source and bind it to a form.
The data source will be;
This is an Associations data source - starting from the Parent Object (we'll set this on the Form when we add it to the web page - refer to separate Help File) - Looking at the Object Type "Document" to "Contacts" associated by "Author(s)".
The data source is bound to a Grid on a Form, and the columns set up (see separate Form type Grid Help File)
When the Form is added to a web page, we are required to set up the Parent Object ID - please refer to separate Help file - which focusses the data source on a specific selected object.
The outcome is that the ASSOCIATIONS type data source will return objects that are associated by a selected type to the Source / selected object.