Custom Attribute Configuration On-Premises Only

An administrator for an on-premises installation can create custom task attributes that display on the properties panel for users to view and modify.

On premises only: Custom attribute configuration is available only for on-premises installations.

Custom attributes must be a string or data (string and date) type, for example, task long description or a planned start and finish date. To create the attributes, you need MQL access to the 3DSpace server.

This page discusses:

Limitations

Following are the limitations for creating custom attributes:

  • These attribute types are not allowed: multivalue, dimensional, person, object, or computed.
  • Custom attributes are not available on the cloud because MQL access is required to upload custom attributes.

MQL Page Object

The customization requires you to upload an MQL page object with the name tsk-services-v2-custom.

The MQL page object should contain an xml file similar to files used for other Foundation V2 base services.

The object matches the xsd: servicesv2.xsd. This xsd is located inside the ENO6WFoundation.jar, which is in the WEB-INF/lib directory of the 3DSpace web application.

For information about working with MQL, see MQL Concepts.

XML File Example

Below is an example of an XML file containing custom attributes.

<?xml version="1.0" encoding="UTF-8"?>
<ds:services xmlns:ds="http://www.3ds.com/enovia/e6wv2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.3ds.com/enovia/e6wv2 servicesv2.xsd">
    <ds:service name="tasks-custom-fields">
        <!-- name should be <nameOfServiceCustomized-custom-fields>-->
        <ds:field name="secondaryname">
            <ds:label text="emxCollaborativeTasks.Label.DropHere" registeredSuite="CollaborativeTasks"/>
            <ds:selectable expression="name" type="bus" autosave="true"/>
            <ds:viewConfig>
                { "readWrite": "true", "type": "textarea", "numberOfDisplayLines":3, "numberOfEditableLines":6, "W":"what" }
            </ds:viewConfig>
        </ds:field>
        <ds:field name="longdescription">
            <ds:label text="Custom Field Name" registeredSuite="CollaborativeTasks"/>
            <ds:selectable expression="name" type="bus" autosave="true"/>
            <ds:viewConfig>
                { "readWrite": "true", "type": "textarea", "numberOfDisplayLines":3, "numberOfEditableLines":6, "W":"what", "insertIndex":4 }
            </ds:viewConfig>
        </ds:field>
        <ds:field name="dueDateCustom">
            <ds:label text="Custom due date " />
            <ds:viewConfig>
                { "type": "date", "W":"when" }
            </ds:viewConfig>
            <ds:selectable expression="attribute[Task Estimated Finish Date]" type="bus" format="utc"/>
         </ds:field>
         <ds:field name="bccAttribute">
            <ds:label text="a Select " />
            <ds:range registeredSuite="Foundation">
                <ds:item value="PAST_DUE" display="emxFoundation.Widget.Date.PAST_DUE"/>
                <ds:item value="NO_DATE" display="emxFoundation.Widget.Date.NO_DATE"/>
                <ds:item value="DUE_TODAY" display="emxFoundation.Widget.Date.DUE_TODAY"/>
            </ds:range>
            <ds:selectable expression="attribute[bccattribute]" type="bus" autosave="true"/>
            <ds:viewConfig>
                 {"readWrite":"true", "type": "select", "W":"what"}
            </ds:viewConfig>
    </ds:service>
</ds:services>

XML File Elements

The XML file contains one ds:service element with the name attribute having the value "tasks-custom-fields".

This service contains one ds:field element for each custom attribute field. This element has a value for the name attribute that does not conflict with any attribute declared in the page object "tsk-services-v2".

Each field element has a ds:label element with two attributes:
Attribute Name Value
text NLS key or the value for the label
registeredSuite NLS registered suite as declared within Collaboration and Approvals (only used for NLS label)

Each field should have a ds:selectable element with three attributes:
Attribute Name Value
expression The MQL selectable
type "bus"
autosave "true" if the field is intended to be editable

Each field has a ds:viewConfig element that contains as text the json configuration for the field.

Each field can have a ds:range element, which is only used if the ds:viewConfig element specifies a "type":"select" field for the property panel. If this element is present, it should have one attribute:

  • registeredSuite. The NLS registered suite as declared within Collaboration and Approvals (only used for NLS displayValue)

If a ds:range element is present, it contains a list of ds:item elements that will correspond to the choices in the drop-down in the select field of the property panel.

Each ds:item element has two attributes:
Attribute Name Value
value The actual value that will be set on the attribute when an entry is selected
display The value that displays in the select field. This can be an NLS key.

Other considerations about the XML file configuration:

  • The configuration corresponds to the configuration for common UI components.
  • If the configuration has a "type":"select" entry and if the field has a ds:range sub-element, the content of the ds:range sub-element is used to compute the "values" entry for the viewConfig element. Any "values" entry in the viewConfig element is ignored.
  • The configuration can have an insertIndex key that contains a number. This number indicates to put the field at that index within its group. If this key is not defined, the field is at the end of the group.

.