Maximo User Groups / Conferences

 View Only
Expand all | Collapse all

Automation script on how to make a field non editable after making a selection

  • 1.  Automation script on how to make a field non editable after making a selection

    Posted 08-07-2024 08:59

    Hello everyone,

    I need help on automation scripts as I am new to scripting.  I am looking for a way to make the field "Assigned Owner Group" non editable after making a selection.  Essentially,  what the need is to to have that field non editable (Read only) after putting in a value in that field.  For eg,  if a selection is made in the  assigned owner group field, the request is to make that field read only,  how can I achieve that? 

    Thanks in advance



    ------------------------------
    Gary Sharma
    HOME
    ------------------------------


  • 2.  RE: Automation script on how to make a field non editable after making a selection

    Posted 08-13-2024 14:50

    Hi @Gary Sharma!

    You need to make a new condition:
    OWNGRP_NONULL - Ownergroup is not null
    :ownergroup is not null

    Then, you need to go to the "Security Groups" application to the "Global Data Restriction" option.

    There, in "Attribute Restriction" define a new one.

    Here, there will be several depending on the applications where you want to apply the configuration (WOTRACK, INCIDENT, SR, etc.). Let's suppose WOTRACK:
    Object: WORKORDER
    Atribute: OWNERGROUP
    Application: WOTRACK
    Type: READONLY
    Condition: OWNGRP_NONULL

    What this does is, for all users, when they use WOTRACK, the OWNERGROUP attribute will be read-only when it is not empty, doing what you want.

    Now, that OWNEGROUP field is READONLY by default and is registered with the "select owner" option that each application has. It must be that in your case someone removed the readonly attribute and that is why it's possible register it manually, but by default it is always readonly.

    Regards!



    ------------------------------
    Martin Fabra
    ARSAT S.A. - Actively seeking employment
    ------------------------------