In some cases, there are restrictions that organizations want to apply throughout the entire Maximo application server and there are a few ways to do this like applying a restriction to the ‘EVERYONE’ group, but a better way is to create a Global Data Restriction. This example shows how to restrict users from adding Labor hour/actuals to a work order that meets a specific criteria.
This example is done in Maximo 7.1 and uses the Conditional Expression to evaluate the record before the labor transaction is saved. This can also be applied to Maximo 7.5, but there are other ways this can be achieved using the Automation Script. But that post is for another day…
Now, the first step is to create a new Conditional Expression. Go To -> Administratrion -> Conditional Expression Manager. Click New Row and add the following fields:
- Type: EXPRESSION
- Expression: (select 1 from workorder where wonum = :refwo and siteid = :siteid and worktype=’EV’) = 1
- Always Evaluate?: checked
This condition will check if the current labor transaction parent workorder has a worktype = ‘EV’ and if so, the expression will evaluate as TRUE.
Next, we need to add a restriction that will use this condition. Go To -> Security -> Security Groups. Then click Select Action -> Global Data Restrictions. In the Object Restrictions tab, click New Row. Enter the following fields:
- Object: LABTRANS
- Application: WOTRACK
- Type: READONLY
- Reevaluate?: checked
- Condition: 1004 (or whatever auto number Maximo created for you in the previous step)
Now click OK. You have successfully create a Global Data Restriction that now will prevent anyone in Maximo from adding a new Labor transaction to a work order with a worktype = ‘EV’.