Adding Custom Attributes to Types

You can extend types by adding attributes to them.

Warning: Add custom attributes before inviting users to the 3DEXPERIENCE platform, and before any content is created. For more information, see Process for Adding Custom Attributes.

This task shows you how to:

Define Custom Attributes

Use the Collaborative Spaces Configuration Center widget to define attributes. For more information, see Widgets to Configure Content and Business Rules.

On the cloud only: You cannot choose or sort the order in which these attributes are displayed to users.

  1. In the menu in the left pane, click Attributes Management.
  2. Click the type of content you want to work with.
    The panes slide to show the list of content types in the left pane, and the table of existing attributes in the right pane.
  3. To add an attribute, follow these steps:
    1. Click Add Attribute .
    2. Enter these details:

      Field Description
      Type (Length) Choose the data type of the attribute from the list. When choosing a string, select the option with the needed number of characters.
      Name Enter a display name for the attribute. You can only use alphanumeric characters, and you cannot use spaces.
      On premises only: Use a string resource as the attribute name to support internationalization. Use this format for the attribute name: emxFramework.Attribute.ATTRIBUTENAME, where ATTRIBUTENAME is a label used to map the attribute display name to the string resources file. If internationalizing attribute names, you must also Define Internationalized String Resources.
      On the cloud only: Names for added attributes are not translated.

      If you enter reserved characters at the start of the attribute name, the app displays an error. For the complete list of forbidden characters, see Forbidden Character Strings for Custom Attribute Names.

      Title Enter a title to display as the attribute label in web, dashboard, and native apps. You can leave this field blank. If you do, the name is displayed for the attibute in apps.

      The title can be different from the name. You can enter the title for the attribute in any language. The title for this attribute cannot be the same as the title or name of any other attribute.

      Tip: Ensure that you enter a unique title for the attribute to avoid seeing multiple attributes with the same title.
      Default Value If appropriate, enter a default value for the attribute:
      • For string attributes, enter the text.
      • For Booleans attributes, select True or False.
      • For date attributes, select a date from the calendar
      • For integer and real attributes, enter a number.

      The default value applies when using interactive commands from a native app, such as "New", "New Major Revision", "Advanced Search", and "Import" (CATIA File). For other functions such as "Import (3DXML)," the default value is not set.

      If you enter an Authorized Values List, the default value must be one of those values.

      If you choose both Mandatory and Read-Only, you must also define a Default Value.

      If you choose Mulit Valuated, you cannot enter a default value. Any existing value will be removed.

      Dimensions (Unit) For Real attributes types only, the unit of measurement for the value. When you select a dimension, the app updates the values for the Preferred Unit based on the selected dimension.
      Preferred Unit The manipulation unit used by native apps only (not used by web apps).
      Export in 3DXML Click to allow the attribute to be exported to 3DXML, a proprietary XML-based format used to export and import 3D data. This option applies only to native apps.

      If you export 3DXML data and import the file to another server, the exported attribute is only imported on the destination server if it is also available on the destination server. That is, if this option is true for the attribute on the export server but false on the import server, the attribute is not imported.

      Multi Valuated Click to enable. If enabled, the user can enter more than one value for the attribute when creating or editing the content type.
      Important: After you create the attribute, you cannot change this setting.
      Reset when Duplicated Click to enable. If enabled, when the type is duplicated, the value for this attribute is reset to the default, if any. If disabled, the current value is copied to the duplicated object.
      Reset when Versioned Click to enable. If enabled, when the type is versioned, the value for this attribute is reset to the default, if any. If disabled, the current value is copied to the new version.
      Mandatory Click to define the attribute as mandatory. The user must enter a value when creating or editing the content type.

      For date attributes, you cannot choose both Mandatory and Read-Only.

      Read-Only Click to define the attribute as read-only, meaning that the value can only be entered using an external app (based on CAA/Automation programming) and not by a native app or web app user.

      For date attributes, you cannot choose both Mandatory and Read-Only.

      Searchable Click to allow the values for this attribute to be used as search criteria.

      When enabled, you can use 3DSearch for filtering in the Advanced Search. If you also selected a tag name for 6W Predicate, the attribute can be used in 6WTags filtering.

      Authorized Values List To restrict the values for this attribute to specific values, enter a comma-separated list of the required values. Do not insert spaces between values.

      For example: value1,value2,value3. Users can only select one of the defined values and cannot enter any different value.

      You cannot enter authorized values for date attributes or attributes with dimensions.

      6W Predicate To support 6W-based searches, select a tag name from the list that most closely matches the purpose of the new attribute. You can choose "Select a 6wtag" to clear the value.

      The list includes all predicates defined in the system, including custom predicates, except for these:

      • The root predicates: Who, What, Where, When, Why, How
      • The core predicates: Title, Name, Type, Creation Date, Modification, Owner

      If you selected Real for the attribute type, do not assign a 6W Predicate. The 6W Predicates do not support attributes of type Real.

      Recommendation: Do not map multiple attributes to the same predicate. If you do, all the attributes are displayed by that predicate when using 6WTags to filter search results. To display attributes separately, map them to unique predicates.

  4. Click OK.
  5. Click Apply.
    The in the Deploy Status column for the new attribute updates to a green checkmark.

    Reset only resets attribute definitions that you have not yet applied.

    Notes:
    • The browser may refresh after 15 minutes of inactivity. Therefore, if you enter the new attribute details and remain inactive for 15 minutes without clicking Apply, when the browser refreshes, you may lose the added information.
    • When using native apps, it could take up to 5 minutes before the new attribute is available.

  6. Reload the cache. For more information, see Reload the Server Cache.
  7. If you enabled indexing for the attribute, see Update the Index Model.

Added attributes display on the view or edit properties form or in widgets, but not in create dialog boxes. You cannot edit an added attribute, but you can remove the existing one and create a new attribute to redefine it.

Define Internationalized String Resources

On premises only: You cannot internationalize attributes names on the cloud.

  1. Open the MQL window:
    1. From the compass, select Social and Collaborative Apps .
    2. In the list of apps, click Collaboration and Approvals.
    3. In the navigation pane, click Utilities > Run MQL.
    To run an MQL command, enter the command in the MQL Command box and click Run or press Enter.
  2. If you have not previously created a Page object for custom string resources, execute this command:

    add page emxFrameworkStringResources.<lang>.Custom.properties

    Where <lang> is the two-letter code for the required language.

  3. Create a text file or edit a saved file with the new attributes.

    For example, you could add this line:

    emxFramework.Attribute.ATTRIBUTENAME=FrenchAttributeName

    On the left side of the = symbol, use the name entered when defining the attribute in the Collaborative Spaces Configuration Center. On the right side of the = symbol, enter the translation for that attribute.

    Save the file with a name related to the Page object, for example mxFrameworkStringResources_fr_Custom_properties.txt. Save the text file in a location convenient for importing.

  4. Modify the Page object with the contents of the text file. For example:

    modify page PAGENAME file FILENAME;

    where:

    • PAGENAME is the name of properties file.
    • FILENAME is the complete path to the file.

    For example:

    modify page emxFrameworkStringResources_fr_Custom.properties file c:\StringResources\emxFrameworkStringResources_fr_Custom_properties.txt;

  5. Restart the server.