Customizing Search Results Columns

This section describes how to create column customizations available to users when they display the search results in Table View and open the Search Options.

You can also associate a column customization to the search results of:

  • A search shortcut.
  • Specific Type and Subtype attributes, that you can select in the Advanced Search panel or in the Tags facets.

Remind that the display of columns works as follows:

  • DS Default Columns - List of columns displayed in the search results by default when no column customization is selected (ds6w:label, ds6w:description, ds6w:identifier, ds6w:modified, ds6w:created, ds6w:type, ds6w:responsible).

    This list is hardcoded in javascript code.

  • Admin Default Columns - List of columns defined by the admin user in a json file. If such a customization exists, it will replace the DS Default columns.

    Turning on Enable column width autofit by default for table view in the 3DSearch Control Center or selecting it in the search settings overrides the column widths you define here.


Before you begin: In the 3DSearch Control Center > Results Attributes, disable the Results Attributes customization option. If you enabled this option, you can only use the Attributes customization management tool to customize the view modes. For more information, see Result Attributes.
  1. Create a new admin customization in the SearchColumnCustoAdmin.json file.
  2. In this file, add a SearchColumnCustoAdminDefinition node with:
    1. A viewId property.

      The viewId value must respect the following formats depending on the use case:

      Use case Format
      Admin Default Column definition ###The_Default_Columns
      To associate the column customization to a Type or Subtype ###TYPE_ID
      To associate the column customization to a Search Shortcut ###ABBREVIATION
      Other column customization not associated to elements Any value as long as it does not start with ### (see Example 1 below).

    2. Then, use:

      • Either a custoAliasToUse property to refer to a list of columns defined in a CustoAliasDefinitions node (see Example 2 below),
      • Or a viewDefinition property listing the list of columns directly.

  3. Deliver the SearchColumnCustoAdmin.json file in:
    • /home/data/RTV/SERVER_NAME/3ddashboard/linux_a64/webapps/SNInfraUX/assets/SearchColumnCustoAdmin.json for 3DDashboard and CATIA V5 POWER'BY.
    • /home/data/RTV/SERVER_NAME/apache-tomcat/webapps/federated/webapps/SNInfraUX/assets/SearchColumnCustoAdmin.json for desktop apps.
  4. Test it using the Column customization command.

Code Samples

Example 1: This is an example with 2 column customizations that are not associated to Type/Subtype attributes or Search Shortcuts.

{
  "SearchColumnCustoAdminDefinition":[
    {
      "viewId": "My admin column custo 1", 
      "viewDefinition": [
        {
         "uri": "ds6w:label", 
         "width": "auto"
        },
        {
         "uri": "ds6wg:BeadFastener.V_XXX",
         "width": 200
        }
      ]
    },
    {
      "viewId": "My admin column custo 2",
      "viewDefinition": [
        {
         "uri": "ds6wg:LPAbstractReference.V_Scale", 
         "width": "auto"
        },
        {
         "uri": "Customer:XXX",
         "width": 300
        },

        {
         "uri": "ds6wg:revison", 
         "width": "auto"
        }
      ]
    }
  ]
}

Example 2: The following example shows how to share a column customization between multiple types or Search Shortcuts. As we want to reuse the same column customization definition several times, we first define a CustoAliasDefinitions node with:

  • An aliasId for this definition.
  • The list of columns to use in the viewDefinition array property.

We can then reference this column customization definition using its aliasId, for example alias_custo_1 and associate it with as many types/subtypes or Search Shortcuts as required, using their viewId (see step 2.a).

{
  "CustoAliasDefinitions": [ 
    {
      "aliasId": "alias_custo_1",
      "viewDefinition": [
        {
         "uri": "ds6w:status",
         "width": "auto"
        },
        {
         "uri": "ds6w:responsible",
         "width": "auto"
        },
        {
         "uri": "ds6w:release",
         "width": "auto"
        },
        {
         "uri": "ds6w:created",
         "width": "auto"
        }
      ]
    }
  ],
  "SearchColumnCustoAdminDefinition": [
    {
      "viewId": "###3DPart",
      "custoAliasToUse": "alias_custo_1"
    },
    {
      "viewId": "###PLMProductDS",
      "custoAliasToUse": "alias_custo_1"
    }
  ]
}

Example 3: This example contains more column customization definitions.

  • In the first one, ###The_Default_Columns is used to define the Admin Default Columns, which will replace the DS Default Columns. The list of columns for this view is defined by custoAliasToUse which refers to The_Default_Columns. This alias definition contains 5 columns: ds6w:status, ds6w:responsible, ds6w:release, ds6w:created, and ds6w:modified.
  • In the second one, ###Physical_Product is the association of a column customization to the Physical_Product (prd:*) Search Shortcut. For this column customization, the list of columns is directly defined in the view definition. So you cannot share it with another column customization.
  • The third one is associated to the 3DPart Search Shortcut and uses the list of columns defined for alias_custo_1
  • The fourth one is associated to the PLMProductDS type and uses the list of columns listed in alias_custo_2.
    Note: Column customization #4, #5 & #6 use the same column definition, that is alias_custo_2, so if you later modify the list of columns in alias_custo_2, you will actually update all these column customizations at once.

{
  "CustoAliasDefinitions": [ {
      "aliasId": "The_Default_Columns",
      "viewDefinition": [ {
          "uri": "ds6w:status",
          "width": "auto"
        }, {
          "uri": "ds6w:responsible",
          "width": "auto"
        }, {
          "uri": "ds6wg:release",
          "width": "auto"
        }, {
		    "uri": "ds6wg:Designated User",
		    "width": "auto",
		    "dataType":"ds6wg:CATPart"
        }, {
          "uri": "ds6w:modified",
          "width": "auto"
        }
      ]
    }, {
      "aliasId": "alias_custo_1",
      "viewDefinition": [ {
          "uri": "ds6w:status",
          "width": "auto"
        }, {
          "uri": "ds6w:responsible",
          "width": "auto"
        }, {
          "uri": "ds6w:release",
          "width": "auto"
        }, {
		    "uri": "ds6wg:Designated User",
		    "width": "auto",
		    "dataType":"ds6wg:CATPart"
        }
      ]
    }, {
      "aliasId": "alias_custo_2",
      "viewDefinition": [ {
          "uri": "ds6w:status",
          "width": "auto"
        }, {
          "uri": "ds6w:responsible",
          "width": "auto"
        }, {
          "uri": "ds6w:release",
          "width": "auto"
        }, {
		    "uri": "ds6wg:Designated User",
		    "width": "auto",
		    "dataType":"ds6wg:CATPart"
        }
      ]
    }
  ],
  "SearchColumnCustoAdminDefinition": [ {
      "viewId": "###The_Default_Columns",
      "custoAliasToUse": "The_Default_Columns"
    }, {
      "viewId": "### Physical_Product",
      "viewDefinition": [{
         "uri": "ds6w:release",
         "width": 40
        }, {
         "uri": "ds6w:status",
         "width": "auto"
        }, {
         "uri": "ds6w:modified",
         "width": "auto"
        }, {
         "uri": "ds6w:created",
         "width": "auto"
        }, {
         "uri": "ds6w:type",
         "width": "auto"
        }, {
         "uri": "ds6w:responsible",
         "width": "auto"
        }
      ]
    }, {
      "viewId": "###3DPart",
      "custoAliasToUse": "alias_custo_1"
    }, {
      "viewId": "###PLMProductDS",
      "custoAliasToUse": "alias_custo_2"
    }, {
      "viewId": "###VPMReference",
      "custoAliasToUse": "alias_custo_2"
    }, {
      "viewId": "###PLMDMTDocument",
      "custoAliasToUse": "alias_custo_2"
    }, {
      "viewId": "###BioMockUp_Protein",
      "custoAliasToUse": "alias_custo_1"
    }
  ]
}
You may not see your custom column layout directly when opening a Favorite Search.

After the column customization, you can perform an Advanced Search and from the Type attribute, select a filter that has an associated layout. In that case, the custom layout is applied automatically.

However, if you add this search as favorite and open it from your Favorite Searches, the default out-of-the-box layout displays instead of the new custom layout. To see the new custom layout, from the Tags panel, select your filter from the Type tag again.