|
| 1 | +--- |
| 2 | +title: "Customization options" |
| 3 | +url: /partners/siemens/bom-component-customization/ |
| 4 | +weight: 3 |
| 5 | +description: "Describes the customization capabilities that allow developers to add in data from other external systems and how these can be combined into the Teamcenter BOM component." |
| 6 | +--- |
| 7 | + |
| 8 | +## Augmenting with Mendix Data |
| 9 | +Client Columns allow you to display custom data next to Teamcenter properties in the BOM view. The widget calls two microflows: |
| 10 | +* `CUSTOM_RetrieveClientColumnDefinitions`: Microflow to retrieve the client column definitions (client column name, width and column order) |
| 11 | +* `CUSTOM_RetrieveClientColumnData`: Microflow to retrieve the additional cell-data to display for the BOM lines and client columns. |
| 12 | + |
| 13 | +As a developer you are free to implement this to your own needs. Additional data can be (but is not limited to) calculated values, third-party data or data from the database. |
| 14 | + |
| 15 | +### CUSTOM_RetrieveClientColumnDefinitions |
| 16 | + |
| 17 | +This microflow is invoked by the TcBOM widget to retrieve the definitions of the custom columns (ClientColumns) to display in the TcBOM widget. |
| 18 | + |
| 19 | +{{< figure src="/attachments/partners/siemens/teamcenter-bom-component/custom-retrieveclientcolumndefinitions.png">}} |
| 20 | + |
| 21 | +#### Input parameter |
| 22 | +* **Object:** `MendixColumnRoot` |
| 23 | +* **Attributes:** |
| 24 | + * `WidgetId` is a unique identifier for the specific TcBOM widget instance making the request. This is useful if you have multiple TcBOM widgets in your application that need to display different columns. You can use this ID to discriminate and return the appropriate data. |
| 25 | + |
| 26 | +{{< figure src="/attachments/partners/siemens/teamcenter-bom-component/domain-model-mendixcolumnroot.png">}} |
| 27 | + |
| 28 | +#### Return value |
| 29 | +* **Object:** `List of ClientColumn` |
| 30 | +* **Attributes:** |
| 31 | + * `Name`: Name of the Client Column. This name is used in the UI of the TcBOM widget as the column title |
| 32 | + * `ColumnOrder`: Order of the column in the widget, respectively. Teamcenter columns also have their own order, so this needs to be filled in conjunction with the Teamcenter columns. Teamcenter columns will take priority in case they have an identical order. |
| 33 | + |
| 34 | + The first column should be object_string, which is already defined. |
| 35 | +All Mendix client columns must start with `columnOrder 2` and would appear before the Teamcenter columns. |
| 36 | +Mendix columns are sorted based on their `columnOrder`. |
| 37 | +Teamcenter columns appear after the client columns. |
| 38 | +The `columnOrder` for Teamcenter columns is defined by the Teamcenter administrator using the column configuration utilities in the **Teamcenter Admin Console**. |
| 39 | + |
| 40 | +{{< figure src="/attachments/partners/siemens/teamcenter-bom-component/domain-model-clientcolumn.png">}} |
| 41 | + |
| 42 | + |
| 43 | +### CUSTOM_RetrieveClientColumnData |
| 44 | + |
| 45 | +This microflow is invoked by the TcBOM widget to retrieve the data to be rendered in the BOM tree. It gathers cell-data for specific BOM lines and any custom columns (`ClientColumns`). |
| 46 | + |
| 47 | +{{< figure src="/attachments/partners/siemens/teamcenter-bom-component/custom-retrieveclientcolumndata.png">}} |
| 48 | + |
| 49 | +#### Input parameter: |
| 50 | +* **Object:** `MendixDataRoot` |
| 51 | +* **Attributes and associations:** |
| 52 | + * `WidgetId`: A unique identifier for the specific TcBOM widget instance making the request. This is useful if you have multiple TcBOM widgets in your application that need to display different data. You can use this ID to discriminate and return the appropriate data. |
| 53 | + * Associated `MendixDataColumnName` objects: This list specifies which custom columns the widget is configured to display. Each object has a `Name` attribute, representing the identifier of a custom column. |
| 54 | + * Associated `MendixDataBOMLine` objects: This list contains the specific BOM lines for which the widget requires data. Each object includes attributes such as `ItemId`, `RevisionId`, `RevisionUId`, and `BOMlineUid` to identify the BOM line and its ItemRevision. |
| 55 | + |
| 56 | +{{< figure src="/attachments/partners/siemens/teamcenter-bom-component/domain-model-mendixdataroot-with-associations.png">}} |
| 57 | + |
| 58 | +#### Return value: |
| 59 | +* **Object:** `List of ClientDataResponse` |
| 60 | +* **Attributes:** |
| 61 | + * `Value`: the value to display in a targeted cell in the BOM” |
| 62 | + * `ClientColumnName`: the name of the column of the targeted cell |
| 63 | + * `ItemRevisionUID`: the item revision UID of the corresponding BOM line of the targeted cell |
| 64 | + |
| 65 | +{{< figure src="/attachments/partners/siemens/teamcenter-bom-component/domain-model-clientdataresponse.png">}} |
| 66 | + |
| 67 | +### ClientColumn overview page |
| 68 | +For convenience, the `TcBOMModule` includes overview and edit pages to define and manage `ClientColumns`. |
| 69 | + |
| 70 | +## Upgrade note |
| 71 | +Please be aware that any direct modifications made to this specific microflow within the `TcBOMModule` will be overwritten and lost during future upgrades of the `TcBOMModule`. |
| 72 | + |
| 73 | +To ensure your custom data retrieval logic is preserved across upgrades, we highly recommend you to create two new microflows in your own module that fetches the column definition and cell-data and returns a list of `ClientColumn` objects and `ClientDataResponse` object respectively. These microflows can then be called in `CUSTOM_RetrieveClientColumnDefinitions` and `CUSTOM_RetrieveClientColumnData`. |
0 commit comments