Clarity PPM

Expand all | Collapse all

Locking an attribute via XOG or GEL

Jump to Best Answer
  • 1.  Locking an attribute via XOG or GEL

    Posted 10-12-2010 07:06 AM
    I would like to know if there is a way to lock an attribute within an instance of an object via XOG or GEL. I need something similar to the process system action of locking some fields. The complication arises that there may be additional fields in the future that need to be locked, and the it may not be possible to modify the process for one extra field.  Any suggestions/ideas would be welcome.Regards,Val Dinu


  • 2.  Re: Locking an attribute via XOG or GEL

    Posted 10-12-2010 07:06 AM
    Use Custom GEL script to  Insert  record into ODF_LOCKED_ATTRIBUTES table. All columns are mandatory.  ODF_PK = id in srm_projects table if Object_code ='project'  attribute_code is code when you create custom attribute.    Hope this helps.  ThanksSiva   Message Edited by sivasairam on 06-22-2009 11:23 AM [left]


  • 3.  Re: Locking an attribute via XOG or GEL

    Posted 10-12-2010 07:06 AM
    I saw that table, and realised that it was possible.  However, I would rather not modify the table directly as it goes against CA's policy of modifying Clarity tables directly.  I noticed that there is a related sequence table linked to the ID in ODF_LOCKED_ATTRIBUTES. Was hoping to have a SP or XOG method of locking them or modifying the tables :-)  Val


  • 4.  Re: Locking an attribute via XOG or GEL

    Posted 10-12-2010 07:06 AM
    Even  we had similar kind of requirement.  we have sent our custom code for CA approval and they approved it. Have been using this for almost 2 years and  we don't see any issues.    insert into app_niku.odf_locked_attributes
                      (ID,
                        OBJECT_CODE,
                        ODF_PK,
                        ATTRIBUTE_CODE,
                        CREATED_DATE,
                        CREATED_BY,
                        LAST_UPDATED_DATE,
                        LAST_UPDATED_BY)
                  values
                      (app_niku.ODF_LOCKED_ATTRIBUTES_S1.nextval,
                        'task',
                        object.id,
                        cur2.attribute_code,
                        sysdate,
                        vn_userid,
                        sysdate,
                        vn_userid);  Note:- Any custom changes to Clarity base tables should be sent to CA for approval before deploying in production


  • 5.  RE: Re: Locking an attribute via XOG or GEL

    Posted 11-21-2012 06:35 AM
    Hi!

    any news about?
    I would like to lock all the attributes belonging to Cost Plan and Benefit plan (details) when the related project / product gets a specific status.
    I am able to lock the project/product's attirubutes via WorkFlow, but I cannot change related costplan details since they belong to a different object.

    Is there a way to do that?

    please help!


  • 6.  RE: Re: Locking an attribute via XOG or GEL
    Best Answer

    Posted 11-23-2012 10:21 AM
    The solution to insert rows into the ODF_LOCKED_ATTRIBUTES table is best approach. CA has approved this solution as long as you send them your proposed code.

    There is no other way to lock attributes via GEL script.

    The only other solution is to do the Manual Action Step where you lock one ore more attributes or All attributes at once.


  • 7.  RE: Re: Locking an attribute via XOG or GEL

    Posted 11-21-2012 10:31 AM
    Regarding a similar requirement, is it possible to make some attributes mandatory to be completed (red icon) via database script, GEL or XOG?

    Thanks


  • 8.  RE: Re: Locking an attribute via XOG or GEL

    Posted 11-23-2012 10:22 AM
    Making a field required via GEL is not possible. This can only be done on the Studio side.


  • 9.  RE: Re: Locking an attribute via XOG or GEL

    Posted 07-11-2013 03:45 PM
    In regards to using the nextval for odf_locked_attributes_s1,
    I was thinking of using this method but I found that when I created a new locked attribute record through the app it was using values in and around 5491112, but the nextval was returning values in and around 5492000.
    I'm not sure why there would be such a gap between what the application is using and what the database stores. It makes me nervous about using nextval.
    Any thoughts?


  • 10.  RE: Re: Locking an attribute via XOG or GEL

    Posted 07-11-2013 04:23 PM
    Hi,

    I have been using the nextval quite a lot, for years, also with odf_locked_attributes inserts, without problems.

    Regarding the difference you see: take a look at the CMN_ID_SP stored procedure. It has a cache parameter, meaning the CA code usually increments the sequence with more then just one. This way it can generate more ids with one call and cache them in the app server in order to minimize/optimize the number of db calls.

    Kind regards,

    Sergiu Gavrila

    ------------------
    Clarity Add-Ons www.itdesign.de/itd-addons/
    Real Time Workload Analytics meisterplan.com


  • 11.  Re: Locking an attribute via XOG or GEL

    Posted 09-25-2014 10:01 AM

    I see this thread is old but I am trying to lock a field in the odf_ca_idea table, it is a custom field to the team object.  However, I need that only a particular team associated with a specific Idea instance.  I am not sure how to do this.  Have you locked a custom field on the team object for an Idea or project?