How to make record readonly based on an attribute’s value

This entry is part of the Conditional Expressions HowTo.

A very typical customization task is to make readonly some records of a specific table based on the value of an attribute.
For example you may wish prevent the editing of purchase orders that have a total costs higher than 1000$ for a specific group. Here is a small tutorial about how you can achieve this.

Open Administration – Conditional Expression Manager application and create the following conditional expression:

  • Condition: POCOST
  • Description: Total cost is more than 1000
  • Type: EXPRESSION
  • Expression: totalcost>1000

Now go to the Security – Security Groups application. Choose the desired group and open the Data Restrictions tab.
Create the following Object Restriction:

  • Object: PO
  • Type: READONLY
  • Reevaluate: true
  • Condition: POCOST

If you now logon with a user belonging to the chosen group and open the Purchase Orders application you will see that POs with a total cost of more than 1000 cannot be modified.

How to make record readonly based on an attribute’s value
Share this post...

3 thoughts on “How to make record readonly based on an attribute’s value

  1. Bruno, can you think of a way to make all fields on a PM read only while still allowing the User to Generate Work Order (without customization)? My issue is that Maximo tries to write back to the object and errors because of my 'read only' data restriction.

  2. Is it possible to use a conditional expression where the dataset contains nulls to create a data restriction? I'm trying to contrain edit of woactivity rows in an application where woactivity.owner != :user. However, the woactivity.owner values may be other users or null.
    creating conditional expression of owner = :user and applying to a READONLY data restriction DOES make the owner's rows READONLY and leaves the others editable, but that is the opposite of what I'm trying to do! 🙂
    Trying "owner is null" or "owner <> :user" does not cause any effect in the woactivity rows' editability.

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top