IQDoc
ITIQPro Docs Maintenance Connection Everywhere (MCe) · EAM/CMMS manuals
UIConfig: Script to hide a field
on the Asset screen

TL;DR

We are going to use a script to hide a field on the screen based on what classification the asset is.

Details

1. You can find UI Configuration under Access Manager.

Getting to UI Configuration

The Access manager requires that you have rights to the "Access Manager" license. YOU decide what permissions it needs, not us, that is discussed elsewhere.) The Access Manager is on the Configuration page

Start by opening the main menu

Start by clicking on the main menu button on the left panel, top left portion.

Shows clicking on the Main Menu button

If the menu button isn't visible, you are likely on a screen too narrow to see everything, press on the left pointing gold button to take you so you can see the menu button.

Shows the gold button to get to the panel containing the main menu button

Once the menu is up, the exact location of the configuration button depends on how wide your window is and how many options you have access to. On most it will be at the top of the 2nd or 3rd column of the menu but on a cell phone or narrow window, it will be down partway in the first column.

Shows how to get to the configuration

Then from there you choose the Access Manager, or what we call the funny green key

Shows the Configuration menu Access Manager button

You can also click on the right hand V button in the main menu (if you don't already have it open), noting if you do it this way, you can directly pick the Access Manager tool that you want to go into.

Shows the Access manager directly from the main menu

From there click on the UI Configuration button

Shows UI Configuration button from Access Manager buttonShows UI Configuration button from Main menu

You can then proceed to clicking the expand/collapse toggles in the following order:

Asset > Edit Page > Summary > Details > details-columns > details-column-1 > Classification.

Classification

Now, under normal circumstances you would just unselect 'Show' to hide a field. But in this case we are looking at a script so we can conditionally hide the field.

2. Click Style: Edit, and a pop-up will appear, where you can put the script to implement your preferred configuration.

Classification

In the Smart Style section of the pop-up, paste in the script for the styling behavior.

Add script

For this scenario, we use the script below to hide "Type" label if the Classification is "Region", "Site" or "State".

// Hides "Type" field when Classification is Site, State, or Region
 
if (!entity) return null;
 
const hiddenClassifications = ["SITE", "STATE", "REGION"];
 
if (hiddenClassifications.includes(entity.classificationID)) {
  return { display: "none" };
}
 
return null; // no match, show Type normally
  • hiddenClassifications now holds the list of codes that should trigger hiding: SITE, STATE, REGION.
  • If classificationID matches one of those, it returns { display: "none" }, which removes the field (and its label) from the layout entirely.
  • Anything else falls through to the final return null;, which is the catch-all for every classification not in the list, meaning "no style override, show the field normally."

3. Going to Asset, selecting "Site", "State" or "Region" under Classification will hide Type(as configured in the script).

Asset

Before Classification change

Before Classification change

After Classification change

After Classification change