Add a SmartObject Association
The Add Association wizard allows you to configure mappings between the properties of two SmartObjects (or between a SmartObject and a workflow) When you create the association, the wizard guides you through the necessary steps. If necessary, the wizard creates a SmartBox service object that contains the mapping information that allows data from the secondary SmartObject to be returned when you call a method in the main SmartObject. Click Add in the Associations tab of a SmartObject to open the Add Association wizard, which contains the following four pages: SmartObject, Association, Relationship, Finished.
See the following resources for more information:
- See How To: Create a SmartObject Association for an example of creating an association between an Employee Details SmartObject and a Departments SmartObject.
Select the secondary SmartObject you want to use for the association for the main SmartObject page. This can be any SmartObject, such as those created in the SharePoint, SQL, Oracle, or a web service, as long as the secondary SmartObject contains data related to the main SmartObject.
Use the Association page to specify the type of association between the SmartObjects.
Options | What it is |
---|---|
Each Customer has a single Region | Defines a 1:1 (one-to-one) relationship |
Customer can have many Region SmartObjects | Defines a 1:M (one-to-many) relationship |
Each Region has a single Customer | Defines a 1:1 relationship |
Region can have many Customer SmartObjects | Defines a M:M (many-to-many) relationship |
Use existing property(s) | Uses existing properties to create relationship mappings |
Create a new property | Uses a new property to create relationship mappings |
When you select an association option on the Association page, one of the following relationships is created between the SmartObjects:
Relationship | Combination |
---|---|
One to One |
|
One to Many |
|
Many to One |
|
Many to Many |
|
Although not common, a Many to Many relationship typically requires a third SmartObject to hold the mapping information. Keep in mind these requirements:
- The current SmartObject must have a key property
- You need to specify a name is specified for the new SmartObject containing the relationship information. The following special characters are not allowed: #%&*\\|:;"\/<>?
The new SmartObject is created in SmartBox and can be found in the category tree.
Use the Relationships page to configure the property mappings between the SmartObjects. The joining property joins the two SmartObjects for when you need data in a lookup for example and can be something like Region=Region:ID as shown in the following images. Select the source property (from the Customer SmartObject in this case) and click Assign to open the Assign property dialog. From the drop-down list select the property to map (ID from the Region SmartObject in this case), and then click OK. This configuration ensures that the region ID information is mapped to the Customer SmartObject, and region Name is returned with customer information.
You can clear the mappings on this page by clicking Clear or Clear All.
You can view, edit, remove, or remove all associations using this page. Select a SmartObject to edit or remove the association. You can double-click the association to make changes using the Association wizard, or click Edit on the menu.