Creating Properties Using Various Constraints
A constraint restricts the value of an object property.
This section provides information on how to use the following constraints when creating a property:
• Dependent
• Conditional Mandatory
• Unique
Creating a Dependent Property
You can select the Dependent constraint for a property to restrict values of the Dependent property based on the values of the parent property. Before creating a dependent property, you must create the parent property with restricted values. Dependent property values can be defined for each restricted value of the parent property.
Example
The Library at WorldWaves University has the need to monitor the subscription of various categories of books.
So, you create a parent property called Books and add restricted values such as Physics, Embedded Systems, and Advanced Web Programming, to name a few.
A Dependent property called Months can then be created, and dependent values such as January, February, March, and April can be added. This helps the library to keep track of the subscriptions of various Categories of books during each month.
You can create Text as well as Numeric type of Dependent properties. For example, Price is a numeric property that can be made dependent on the Text property called Region.
To Create a Dependent Property
1. On the first page of the New Property wizard is displayed, specify the Property Name and select the Text or Numeric Property Type.
2. Select the tab or group to which the property belongs.
3. Select the required property attributes.
4. In the Constraints section, select Dependent Property and click Next.
The second page of the New Property wizard is displayed.
5. From the Select the parent Property drop-down list, select the required parent property.
The range of values available for this new property depends on the restricted values already defined in the associated parent property.
6. From the Select Parent Property Value list, select the restricted value of the parent property.
7. If you want to specify a numeric type of dependent property value, select Numeric Dependent.
8. Click Add/Delete. The Add/Delete dialog box is displayed.
Note that when you click Add/Delete, the Dependent constraint, Property type, and parent property definitions are saved. You cannot change these definitions.
9. In the Enter a Value field, type a dependent property value, and click Add. Repeat this step to add more dependent property values.
10. Click Language to set the language of the selected property value, and then click Close.
11. Click Insert, and select the values of the dependent property to be used for the new property that you are defining.
The values that you insert for a selected parent property value is displayed in the Define Child Property Value(s) list.
12. Use the Move Up, or Move Down buttons to define the order in which the list of values must be displayed.
13. Click Finish.
Things to Remember
• A Dependent property cannot have a default value.
• A protected restricted property cannot serve as the base, or as the parent property of a dependent property.
• You can set a restricted text property as a dependent on another restricted text property, but not on a numeric property.
• Specific to an interaction object, for a custom property defined as a dependent on another property:
◦ If a value is assigned to the base property, the dependent property can only take values that are dependent on the base property values.
◦ If the base property is blank, the dependent property can be assigned any value.
◦ If the dependent property is assigned a value while the base property is empty, and you assign a value to the base property, the dependent property value is deleted.
Creating a Conditional Mandatory Property
You can define Conditional Mandatory Properties for properties with restricted values. When you create such a property, you associate it with a Parent Property, and indicate the condition under which the Property you are creating becomes mandatory. You create this association by specifying the restricted values of the Parent Property for which the Property is mandatory. Ensure that the Parent Property is an enumerated Text type of Property.
In a simple scenario:
1. You create an enumerated Text type of property with values Yes and No.
2. You then create a Conditional Mandatory property.
3. You indicate that this property is mandatory only when the value for the parent property is Yes.
In this way, you can specify multiple values of a parent property, for which the property you are creating becomes mandatory.
The check for Conditional Mandatory constraint is performed only in the Object windows in Desktop Client. However, this check is not performed when the system generates object items such as interactions created through Rules and Mailers.
For example, if a Rule creates an interaction without specifying Conditional Mandatory property values, CampusNexus CRM allows the creation of this item. However, if a user tries to save such an interaction, an error message is displayed prompting the user to provide values for the Conditional Mandatory properties.
To Create a Conditional Mandatory Property
1. On the first page of the New Property wizard is displayed, specify the Property Name and select the Text, Numeric, or Date Property Type.
2. Select the tab or group to which the property belongs.
3. Select the required property attributes.
4. In the Constraints section, select Conditional Mandatory Property and click Next.
The second page of the New Property wizard is displayed.
5. From the Select base Property list, select a parent property.
6. Select the restricted values of the parent property for which the property you are creating must be mandatory.
7. Click Finish.
Creating a Unique Property
You can select the Unique Property constraint for a property to ensure that no two object items have the same value for the property. In the same way, you can define a pair of properties that must be unique. For example, you can indicate that a combination of the Last Name and First Name must be unique.
Example
Simple Unique Property
The following can be defined as Unique Properties:
• Social security number
• Driver’s license number
• Email address
Combinational Unique Property
The following can be defined as Combinational Unique Properties:
• On a network of computers, Login ID and Domain ID.
• In an automobile registration, state code and the number.
If you select more than two properties to be unique when they are combined, the same count of unique pairs of properties are created.
Using a similar example, if you have three properties: Telephone Number, Area Code, and City Name:
When creating Telephone Number as a property, you can specify that it must be unique when combined with Area Code and City Name. In this scenario, CampusNexus CRM does not allow any two contacts to have the same Telephone Number + Area Code or Telephone Number + City Name combination.
However, the system allows two contacts to have the same Area Code and City Name as long as the Telephone Number is different.
To Create a Unique Property
1. On the first page of the New Property wizard is displayed, specify the Property Name and select the Property Type. You can choose any property type except Email and Related Object Property.
2. Select the tab or group to which the property belongs.
3. Select the required property attributes.
4. In the Constraints section, select Unique Property and click Next. Here, you can:
◦ Select the Individually Unique option to make the property exclusively unique.
◦ Select the Combinational Unique with option.
5. Select the properties with which the new property must be unique (in combination).
6. If you are creating a URL or Date type of property, click Finish.
If you are creating a Text or Number type of property, click Next. The second page of the New Property wizard is displayed.
7. Specify the required values and click Finish.