Create string attributes

This chapter explains how to create an attribute in iPIM CC, using the example of an optional string-type category attribute on the product level for which only letters are allowed. For the latter purpose, a regex validation is set up which prevents attribute values that contain integers from being saved.

INFO
Click here to find the list of rights that are required to create attributes.

Step 1: Specify base data and create the attribute

In the first step you need to insert the basic attribute data and create the attribute. To do so, proceed as follows:

  1. Call up the iPIM CC module and go the “Configuration” area of the “Attributes” section.
  2. Click on the CREATE button. Following this, a new attribute dataset with empty input fields is generated.
  1. In the “Configuration” card, enter an attribute ID in the “Attribute ID” field.
  2. Select the option “Character string, not localized” from the “Attribute type” menu.
  3. Select the option “Category attribute” from the “Scope” menu.
  4. Select the option “Product” from the “Attribute level” menu.
  1. In the “Attribute localizations” card, enter the various multilingual attribute names in the respective fields of the “Name” column.
  2. Click on the SAVE button in the lower right corner to finish the process. If the process was successful, a corresponding message will appear. The attribute is now created and it can be configured further in the following tabs.

Step 2: Assign a category

In the second step you need to assign a category to the attribute. To do so, proceed as follows:

  1. Go to the “Categories” tab.
  2. Click on the ADD button in the footer to call up the corresponding dialog box.
  1. Select a taxonomy from the taxonomy selection menu. Following this, the corresponding category directory is shown below.
  2. Choose the category from the category directory.
    Possibly use the column header tools to filter the list of categories.
  3. Tick the category in order to select it.
  4. Click on the SAVE button to finish the process. If the process was successful, a corresponding message will appear. The selected category is now assigned to the attribute.

Step 3: Specify a regex validation

In the “Validations” tab you can specify Javascript and regex validations. For a corresponding attribute, it is checked whether the entered value corresponds to the conditions specified in the validation rules. Using the example of a regex validation that is configured to make sure that no integer values are entered, this chapter explains how to set up a validation rule. In order to set up a regex validation rule, proceed as follows:

  1. Go to the “Validations” tab.
  2. Click on the CREATE REGEX VALIDATION button in the footer to call up the corresponding dialog box.
  1. Enter multilingual error messages. To do so, click on the More button in the “Message” field. Following this, you will be directed to another slider.
  2. Enter the error messages for the various locales in the respective input fields. You don’t have to fill in all the fields.
  3. Click on the button to get back to the previous slider.
  4. Enter the regular expression [^0-9] in the input field “Regular expression”.
  5. Click on the SAVE button to finish the process. If the process was successful, a corresponding message will appear. The regex validation is now set up.
Via the expression [^0-9] integer values are excluded from being used. Attribute values that contain integer values cannot be saved.