Text Features

Use a text feature to allow your user to enter text.

  • For example, enter a name, address, or other details.
  • Enter any alphanumeric value.

Configurator also uses a text feature to store a calculated value.

Example

Try it.

  1. Open the workspace that has your model.
  2. In the Structure Hierarchy area, click the zCZ_CAR4DRSDN root node.
  3. Click Actions > Create > Text Feature.
  4. In the dialog that displays, set the values, then click OK.
    Attribute Value
    Name Monogram
    Maximum Length

    6

    The maximum length is 32,000 characters.

    This is not equivalent to 32 KB, which equals 32,768 bytes. There is no relationship between Kilobytes and the maximum length of a text feature.

  5. Click Test Model, then verify that the Test Model page displays your Monogram text feature, and that you can enter no more than six characters.

Rules

You can use a configurator rule to set the value for a text feature.

Attribute Value
Type of Rule Description
Default Rule

Use a default rule to set the default value that Configurator displays for a text element.

Configurator applies the default rule at runtime when the user manually selects an option and enters a value.

Configurator can also apply a default rule when it starts the configuration at runtime.

A text feature doesn't have a range of values that you assign through minimum and maximum values, so you can't use Domain Ordering to set the default value. If your text feature must have a value, then you can use a default rule to set it.

Constraint Rule

Use a constraint rule to set the value for a text feature when the user manually selects another option and sets a value for that option.

For example, if the user sets Boolean feature x to True, then the constraint rule sets the value for text feature y to value z.

Extension Rule Use an extension rule to set the value for a text feature according to your specific needs.

Use the Value()method in your rule to get the value from a text feature.

If you use a rule to compare values between text features, and if these values might change, then you can only test for equality. Comparisons are case-sensitive. You must use one of these:

  • Equals()function
  • NotEquals()function
  • = (equals) operator
  • < (less than) operator
  • > (greater than) operator

Here's an example rule that sets the default value of the Last Name text feature to Enter your last name here. You must set the rule's class to Default.

'UserLogin'.'Last Name'.Value() = "Enter your last name here."

Here's an example rule that compares the values that your user enters in the Email Address text feature to the value that the user enters in the Confirm Email Address text feature. If the values in these two features are equal, then the rule sets the Success option under the Addresses Match option feature.

Equals( 'UserLogin'.'Email Address'.Value() , 'UserLogin'.'Confirm Email Address'.Value()) // See if the values in the UserLogin text feature and the Confirm Email Address text feature are equal. If so, then the condition is true.
  REQUIRES 
'UserLogin'.'Do addresses match?'.'Success. Addresses Match.'.State() // If condition is true, then set the Success feature option to Addresses Match.

Here's another example rule. If the user selects the Success option, then the rule sets the value of the Address Check Result text feature to We accept your address.

'UserLogin'.'Do addresses match?'.'Success. Addresses match.'.State() // Success option is selected.
  REQUIRES
'UserLogin'.'Address Check Result'.Value() = "We accept your address."  // Set the value of the Address Check Result text feature.

Use Text Features as Navigation Aids

You can use a text feature as a navigation aid when you have a large configuration that displays more than page at run time. You can display text on each page that helps your user track where they are in the flow. You can then use the text feature in a rule to populate text elements that don't depend on the model's structure. You can conditionally display text at runtime. For example, display details in the text element that describe the options the user has selected.