Extending to show how to add a new relationship to the external transmittal report - SmartPlant Foundation - IM Update 48 - Help - Hexagon

SmartPlant Foundation Help

Language
English
Product
SmartPlant Foundation
Search by Category
Help
SmartPlant Foundation / SDx Version
10
SmartPlant Markup Plus Version
10.0 (2019)
Smart Review Version
2020 (15.0)

This example shows how to add the organization of a recipient user to the report output.

From the transmittal, the organization of the recipient can be found by navigating to the workflow, to the workflow step, and then to the recipient interface. Following the SPFRecipientUser relationship to get to the user, the SPFUserOrganization relationship can be traversed to get to the organization of the recipient user.

To add the organization for the recipient user, the graph definition, ExternalXmtlReport, will need to be updated to navigate to the organization of the user. The SPFUserOrganization relationship is defined to expand from the SPFRecipientUser to the SPFCompany. Use the Schema Editor to update the graph definition as seen the following image.

Edit Graph Def for Rel

This can be represented as the following:

Add Rel settings

The view definition, ExternalXmtlReportViewDef, needs to be updated to include the organization name in the underlying report XML. The XML output from the report would include the new <SPFReportItem><ReportAttribute> nodes.

Use the Schema Editor to update the view definition as seen in the following image:

Edit View Def 3

This can be represented as the following:

When the report runs to get the raw XML, it will have added the Organization Name as a new <ReportAttribute> under the <SPFReportItem> node for the <SPFCompany> node. The <SPFCompany> node will reside under the <SPFLoginUser> node as defined by the graph definition.

This can then be used in the XSL template to display the organization name for the recipient user. A new Company column will need to be defined in the XSL, and also some extra XSL code will need to be added. The extra XSL code is needed to navigate to the <SPFCompany> node’s <SPFReportItem> so it can iterate through the newly added <ReportAttribute>.

Table XML 1

Table XML 2

Table XML 3

Table XML 4

The following section appears on the report when you click File > New Report.

Report example with organization