Require Properties

Jiri Hietanen
Jiri Hietanen
  • Updated

The Require Properties tool sets validation rules that require properties. The rule says that the objects of an object class, or the objects in a group, must have a value for the property. With Is Required OFF, the tool removes the rule.

For example, you can require that all spaces have a value for the space type, or that the objects in a group have a fire rating.

There are also other validation tools:

  • To set a rule for the values of a text property, for example a list of allowed values, use the Set Text Property Rules tool. A property with a text rule is also required.
  • To require that object classes have objects or do not have objects, use the Require Object Class tool. For groups, use the Require Object Group tool.
  • To remove the rules of all properties at once, use the Clear Validation tool.

How the properties are validated

  • A required property passes when the objects have a value for it. It fails when some of the objects have no value.
  • In an object class, a required property that is excluded fails.
  • In an object class, properties with a list of values are not validated.
  • The properties of an object class are validated only when the object class has included objects. The same applies to the objects in a group.

An object class or a group fails when one of its validated properties fails.

The Properties palette shows the results when it shows the objects of the object class or group: the required properties get a status icon, passed or failed. Hover the mouse over the icon to see the validation message. The values of a required property get the 'not validated' icon, because only the existence of the values is checked, not the values themselves. You can turn this icon off with the Flag Not Validated Values setting in the Validation tab of the Application Settings. You can read more in Properties Palette.

When Trimmer Mode is off, the Properties palette hides excluded properties. A required property that is excluded is then shown as a row with the value <excluded>, marked as failed.

Properties that do not exist

You can require a property that is not in the model yet, for example a property that a later step of the dataflow adds. If an object class does not have the property, the tool keeps the rule by the name or key you gave, and reports which properties the object class does not have.

For a group, the property must be a property of every object class of the objects in the group. If it is not, the tool keeps the rule by the name or key in the same way and reports it.

The rule applies to the property as soon as a property with that name or key exists. Until then, the Properties palette shows the property as a row of its own, marked as failed, when it shows the objects of that object class or group. The value of the row is <missing> when the property does not exist. The row is shown in italics and cannot be selected.

One rule per property

A property has one rule in each object class and in each group. If the property has a text rule set with the Set Text Property Rules tool, requiring the property replaces the text rule: the property is then only required to have a value. Running the tool again with the same settings does not add anything.

The rules of an object class and the rules of a group are separate. A property can, for example, be required in an object class and have a text rule in a group at the same time.

With Is Required OFF, the tool removes the rule of the property, also a text rule. This is also the way to remove a text rule.

Settings

Target

Defines whether the properties are required in object classes or in object groups. The default value is Object Group.

Object Class

The properties are required for all the objects of the object classes defined in the Object Class(es) setting.

Object Group

The properties are required for the objects in the groups defined in the Object Group(s) setting. The rule is for the properties of the objects, not for the properties of the group itself.

Object Class(es)

Defines the object classes for which the properties are required, or no longer required. This setting is available when the Target is Object Class. You can choose All, one object class or a list of object classes. The setting has no default value.

The rule is set for the object classes whether their objects are included or excluded.

If the setting is empty or does not find any object classes, the tool reports that no object classes were found and does not change the model.

With All, the rule is set for every object class. Every object class that does not have the property gets the rule for a missing property, and the Properties palette shows the property as <missing> for each of them. Select only the object classes that should have the property.

Object Group(s)

Defines the groups for which the properties are required, or no longer required. This setting is available when the Target is Object Group. You can select one group, several groups, or all the groups of a group category or below a parent group. Group names can contain the wildcards * and ?. The setting has no default value.

The groups must exist in the model. The rule is set for the groups whether their objects are included or excluded. A group must have objects to get the rule, because the properties are looked up in the object classes of its objects. The tool skips a group without objects and reports it. With Is Required OFF, the rule is removed also from a group without objects.

If the setting is empty or does not find any groups, the tool reports that no groups were found and does not change the model.

Properties

Defines the names or identity keys of the properties. This setting is mandatory. If it is empty, the tool reports an error and does not change the model.

You can list several properties. Type a single value directly into the box. To enter several values, click the list button at the right end of the box. The List Editor opens, where you enter one value per line. With two or more values the box shows the number of values, for example, '3 Items', and the values can then be changed only in the List Editor. The × button clears the box.

Spaces before and after the names are ignored, empty lines are skipped and a name listed twice is used once. Upper and lower case letters are not significant. Wildcards are not supported.

The tool looks for the property by its identity key first and then by its name. If an object class has several properties with the same name, for example in different property sets, the tool uses the first one it finds. Use the identity key of the property in this case.

Is Required

If ON, the properties are required. If OFF, the tool removes the rule of the properties: the requirement, a text rule set with the Set Text Property Rules tool, and a rule that was kept for a property that does not exist. The default value is ON.

Release Notes

This tool was added in Simplebim 12.0 SR2

Related to

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.