Skip to main content

Setup Dynamic Dashboard

  1. Select assembly CalcByFreqSharp.
  2. Select file DynamicDashboardSvc.cs in the Services folder.
  3. Search for FIX 1.

alt text

  1. As described in the comment underneath “FIX 1”, uncomment lines containing code and fix them by replacing the template REPLACE_WITH_CORRECT_FUNCTION with the actual api call GetDynamicComponentsForDynamicDashboard (use IntelliSense to complete to help avoid typos).
WsDynamicComponentCollection comps = api.GetDynamicComponentsForDynamicDashboard(si, 
workspace, dynamicDashboardEx, String.Empty,
null, TriStateBool.Unknown, WsDynamicItemType.Unknown);
  1. Apply changes for FIX 2, in this case using the api method GetComponentUsingBasedOnName and the Embedded Component name embDBF.
WsDynamicDbrdCompMemberEx embComp = comps.GetComponentUsingBasedOnName("embDBF");
  1. Apply changes for FIX 3. Use IntelliSense to locate the EmbeddedDashboardName property of the component, which we will manipulate.
embComp.DynamicComponentEx.DynamicComponent.Component.EmbeddedDashboardName = dashboardName;

  7. From OnePlace, expand Jan and select MyProcess.Import. A (dynamically defined) dashboard should display.

alt text

note

EXERCISE COMPLETED! 🎉 Stop here, or continue on to Exercise 3.