Calculating whether to add an asset detail

You can use a detail page formula to calculate whether to add a personalized tab to an asset InfoViewer. For example, you could write a formula that adds a Hazmat tab to the Vehicle InfoViewer for an asset whose vehicle type is 18Wheeler. You specify a detail page formula when you define a detail page.

Detail page formulas use the oAsset object (an instance of the Hansen.AssetManagement.Asset class) to set ShowPage to either True or False. If the formula returns True, then the tab is added to asset InfoViewers for the asset type. If the formula returns False, then the tab isn't added. For more information about this object and for sample code, click the Information tab in the Formula Editor.

Example

This formula adds a tab to Vehicle InfoViewers for vehicles whose vehicle type is SUV.

If oAsset.UnitType.Code = "SUV" Then
   ShowPage = True
Else
   ShowPage = False
End If