Configuring the compare tab
To configure a "Compare" tab for use in a details view, a GraphQL mutation must be drafted. By setting one or more "ConditionTypes" on the mutation, admins can determine under what circumstances a "Compare" tab will display.
To run this mutation from your local STEP environment, follow the steps described below:
1. Open the local GraphiQL editor by navigating to your local STEP server using this URL template: https://[servername]/graphqlv2
2. Enter your login credentials (creating this tab requires admin access)
Written below is an example of the "Compare" tab mutation, followed by a description of the relevant elements that will need to be amended from the example to make the "Compare" tab useful for each instance. Copy from this example mutation (using the "Copy" link in the upper-right hand corner of the example) and paste it into GraphQL:
mutation writecfg {
updatePerspectiveView(input:
{propertyName: "CompareRecords",
configurationName: "Compare Records - Configuration",
tabType: "COMPARE",
viewName: "Compare Records",
groupId: "PMDM.UG.BuyerGroup",
conditions: [
{conditionType: "ObjectType", objectTypeIDParameter: "PMDM.PRD.InternalSourceRecord"},
{conditionType: "Task", workflowIDParameter: "PMDM.WF.InternalSourceRecordCreation", stateIDParameter: "Buyer_Review"},
{conditionType: "Workflow", workflowIDParameter: "PMDM.WF.InternalSourceRecordCreation"}
],
viewContents: [
{itemID: "CharacteristicsAttributes", itemType: "attributeGroup"}
]
}
) {success}
}
-
Tab ID : On line three (3) in the example (propertyName), the "Tab ID" refers to the unique ID for the specific tab referenced.
-
Configuration Name : On line four (4) in the example (configurationName), the "Configuration Name" is the label given to the tab configuration as it displays in the "All tabs" and "Available tabs" sections of the "Tabs setup" tab in the Configuration tool. This allows admin users to visually distinguish between similar tabs in the configuration tool. It is not the "name" of the tab, nor the "ID"; it is only the name of the tab configuration.
-
Tab Type : On line five (5) in the example is "Tab type" (tabType). The "Tab type" refers to the type of the configured tab, and is not customizeable. The "Compare type" for all "Compare" tabs is "COMPARE".
-
View Name : On line six (6) in the example is "View Name" (viewName). The value added here determines what label displays on the tab itself in the details view wherever the tab is configured to display.
-
Group ID : On line seven (7) in the example is "Group ID" (groupID). The value(s) added here define which user groups will see this tab. For instance, if the user group "Data Stewards" is listed but the user group "Marketers" is not, users in the group "Data Stewards" will see the configured tab where all conditions are met, but users in the "Marketers" user group will not.
-
Conditions : On line eight (8) in the example is "Conditions" (conditions). In this section of the mutation, admins can list the conditions under which the configured tab will display. Adding conditions here is optional: if no conditions are defined, the tab will be shown on all object types in all contexts on both the browse and task perspectives. For example, admins can stipulate that a user must be viewing a product of a specific object type, in a specific workflow, and / or in a specific workflow state. If all requirements are met and the user is in a configured user group, the tab will display. If any of the added conditions are not met, the tab will not display.
-
View Contents : On line thirteen (13) in the example is "View Contents" (viewContents). In this section of the mutation, admins can list all attribute groups required to display in the configured tab.
-
GraphQL call : On line seventeen (17) in the example is the "GraphQL call". This element in the mutation is meant for the admin writing the mutation. This element confirms when the GraphQL call is successful.