Item View Sidebar

Display the ad hoc Graph View from an Item View Sidebar button

“I want to add a button to the sidebar of all items that will show an ad hoc Graph View in the item view.”

Figure 38. A sidebar button for displaying the ad hoc graph is added to the global Item View definition

  1. Navigate to Administration > Configuration > Client Presentation in the TOC.
  2. Click the Search button to run the Client Presentation search.
  3. Click the Global item property in the single search result.
  4. In the Command Bar Section grid, open the Global Sidebar item.
  5. Click the Edit button.
  6. Click the New button in the Command Bar Item grid, then select Button > OK in the dialog to create a new button with the following properties:

    1. Name: My_Ad_Hoc_Graph_Button
    2. Sort Order: 256
    3. Action: Add
    4. For Identity: World
  7. Right click the new button row and select Open.
  8. Enter the following properties for the new Menu Button:

    1. Click Method: sidebar_default_gv_click
    2. Image: choose the icon you want to show when the sidebar button is inactive
    3. Additional Image: choose the icon you want to show when the button is active
  9. Click the Save button and close the Button tab.

Display a query-based Graph View from an Item View Sidebar button

“I want to display the Part BOM Graph View when the user clicks a sidebar button on a Part.”

Figure 39. A sidebar button for displaying a specific graph is added to the Part form

  1. Open the Part ItemType and select the Client Style relationship tab.
  2. Right click the entry in the grid and select Open to open the Presentation Configuration for the Part ItemType.
  3. Click the Edit button.
  4. Click the New button in the Command Bar Section grid to create a new section with the following properties:

    1. Classification: Data Model
    2. Name: Part_Custom_Sidebar
    3. Location: ItemWindowSidebar
    4. Sort Order: 256
    5. For Identity: World
  5. Click the Save button, then right click the new Command Bar Section, and select Open.
  6. Click the Edit button.
  7. Click the New button in the Command Bar Item grid to create a new item with the following properties:

    1. Type: Button
    2. Name: My_Graph_Button
    3. Sort Order: 1100
    4. Action: Add
    5. For Identity: World
  8. Click Save, then right click the new Button, and select Open.
  9. Click the Edit button.
  10. Set the following properties on the item form:

    1. Additional Data: {"gvdId": “<graph view id>” }
    2. Click Method: sidebar_default_gv_click
    3. Image: choose the icon you want to show when the sidebar button is inactive
    4. Additional Image: choose the icon you want to show when the button is active
  11. Click Save, then navigate to Design > Parts in the TOC.
  12. Open a Part item to see the new button in the sidebar.
  13. Click the new sidebar button to view the specified Graph View.

Display a Tree Grid View from an Item View Sidebar button

“I want to display the BOM as a Tree Grid View when the user clicks a sidebar button on a Part.”

Figure 40. A sidebar button for displaying a Tree Grid View is added to the Part form

  1. Open the Part ItemType and select the Client Style relationship tab.
  2. Right click the entry in the grid and select Open to open the Presentation Configuration for the Part ItemType.
  3. Click the Edit button.
  4. Click the New button in the Command Bar Section grid to create a new section with the following properties:

    1. Classification: Data Model
    2. Name: Part_Custom_Sidebar
    3. Location: ItemWindowSidebar
    4. Sort Order: 256
    5. For Identity: World
  5. Click the Save button, then right click the new Command Bar Section, and select Open.
  6. Click the Edit button.
  7. Click the New button in the Command Bar Item grid to create a new item with the following properties:

    1. Type: Button
    2. Name: My_TGV_Button
    3. Sort Order: 1200
    4. Action: Add
    5. For Identity: World
  8. Click Save, then right click the new Button, and select Open.
  9. Click the Edit button.
  10. Set the following properties on the item form:

    1. Additional Data: {"tgvdId": “<tree grid view id>”, “startConditionProvider": “ItemDefault({\"id\":\"id\"})” }
    2. Click Method: sidebar_default_tgv_click
    3. Image: choose the icon you want to show when the sidebar button is inactive
    4. Additional Image: choose the icon you want to show when the button is active
Note
The startConditionProvider property in Additional Data is optional. The view will use the context item’s id as the starting condition if this property is not provided. It’s only necessary to include the startConditionProvider property if your Tree Grid View has a start condition that is not the id of the context item.

  1. Click Save, then navigate to Design > Parts in the TOC.
  2. Open a Part item to see the new button in the sidebar.
  3. Click the new sidebar button to view the specified Tree Grid View.