Clarity PPM1

Expand all | Collapse all

CA PPM Tuesday Tip: How to find out what lookup is being used in an attribute

  • 1.  CA PPM Tuesday Tip: How to find out what lookup is being used in an attribute

     
    Posted 01-05-2015 01:03 PM

    How to find out what lookup is being used in an attribute when there are multiple lookups with  the same name, but different ID

     

    In an object when you check the Attributes Properties you see the name of the lookup, not the ID.

     

    Example:

    Idea Object

    Attribute = Manager, Lookup = Browse Resource

    Attribute = Originating Requestor, Lookup = Browse Resource

     

    There are 2 lookups with same name “Browse Resource”:

    ID = BROWSE_PROJMGR

    ID = BROWSE_PROJMGR_LT

     

    OPTION 1:

     

    This is a long way to find out which lookup is being used, but it is easy.

    Admin side: Go to Lookups -> Open one of the lookups with the same name.

    Go to Browse Window' tab.

    Add a field to the list layout.

    Then open an instance of the object to find if the field I just added is present there.

     

    OPTION 2:

     

    Use debug.data on any page that shows the browse it is using (maybe the attribute properties, or the actual subpage of an idea instance)

    e.g.  Attribute properties of Manager attribute

    Admin side: Go to objects -> idea -> idea -> attributes -> manager

     

    The URL is:

     

    http://yourservername/niku/nu#action:odf.objectDefinitionAttribute&code=manager_id&partitionCode=NIKU.ROOT&allowCustomAttributes=true&component=pma&object=idea&object_id=5000043

     

     

    Replace # with ? and : with = in the URL and add &debug.data=true at the end of the URL:

     

     

    http://yourservername/niku/nu?action=odf.objectDefinitionAttribute&code=manager_id&partitionCode=NIKU.ROOT&allowCustomAttributes=true&component=pma&object=idea&object_id=5000043&debug.data=true

     

     

    In the xml you will find:

     

    - <attribute active="true" clientFlags="8" code="manager_id" column="MANAGER_ID" dataType="number" editable="true" extendedType="lookup" id="-2" inherited="true" lookupType="BROWSE_PROJMGR" partitionCode="NIKU.ROOT" partitionMode="PARTITION_AND_ANSTRS_DESDNTS" table="INV_INVESTMENTS">

     

     

    OPTION 3: for non-custom attributes

     

    The information can be found in the 'omd' (object meta data) files under $NIKU_HOME/META-INF/compcode/omd/object.xml (where compcode is like 'pma' or 'projmgr' or 'revmgr' and object is like 'project' or 'idea' or whatever it may be)

     

    for example, $NIKU_HOME/META-INF/omd/idea.xml has this definition:

     

    <attribute code="initiator_id" dataType="number" required="true" lookupType="BROWSE_PROJMGR" extendedType="lookup" editable="true" column="INITIATOR_ID" table="INV_IDEAS"> <nls description="Originating Requestor" name="Originating Requestor" languageCode="en"/> <default replace="userId"/> </attribute>



  • 2.  Re: CA PPM Tuesday Tip: How to find out what lookup is being used in an attribute

    Posted 01-05-2015 03:08 PM

    Thanks for this, I've run in to this several times and just lived with "trial and error", bookmarking this for (I'm sure many) future references.



  • 3.  Re: CA PPM Tuesday Tip: How to find out what lookup is being used in an attribute

    Posted 01-06-2015 12:26 AM

    Thanks for sharing this useful info, Nora

     

    NJ



  • 4.  Re: CA PPM Tuesday Tip: How to find out what lookup is being used in an attribute

    Posted 01-06-2015 07:57 AM

    Thanks for the tips.

    This could be improved if the Lookup text in the attribute list were a link which would take the user to the lookup properties or display  the ID of the lookup

    A solution somewhat faster to implement were to give lookup ID in the attribute properties instead of the name.

    Of course simply using unique lookup names would avoid that.

     

    By looking at list of lookups you can see that there so many similar names that you cannot always pick the one you want just from the list but have go through the exercise of identifying the one you need.

     

    Option 1 is good because it is available for admins.

    Before adding a field to the layout you could try the preview to see if that helps you to determine the one you want.

    You can also add the field to the filter as an alternative to the layout.

     

    Option 2 is even better because that is available for all users who might need it without any compromise on security (I think)

     

    Option 3 is only available for those who have access to server folders or can get them from the install media or have made the file available for this type of use before hand.

     

    Thanks again.



  • 5.  Re: CA PPM Tuesday Tip: How to find out what lookup is being used in an attribute

    Posted 01-06-2015 11:48 AM

    Thanks for the tip Nora!

    Nora Tobon wrote:

     

    How to find out what lookup is being used in an attribute when there are multiple lookups with  the same name, but different ID

     

    In an object when you check the Attributes Properties you see the name of the lookup, not the ID.

     

    Example:

    Idea Object

    Attribute = Manager, Lookup = Browse Resource

    Attribute = Originating Requestor, Lookup = Browse Resource

     

    There are 2 lookups with same name “Browse Resource”:

    ID = BROWSE_PROJMGR

    ID = BROWSE_PROJMGR_LT

     

    OPTION 1:

     

    This is a long way to find out which lookup is being used, but it is easy.

    Admin side: Go to Lookups -> Open one of the lookups with the same name.

    Go to Browse Window' tab.

    Add a field to the list layout.

    Then open an instance of the object to find if the field I just added is present there.

     

    OPTION 2:

     

    Use debug.data on any page that shows the browse it is using (maybe the attribute properties, or the actual subpage of an idea instance)

    e.g.  Attribute properties of Manager attribute

    Admin side: Go to objects -> idea -> idea -> attributes -> manager

     

    The URL is:

     

    http://yourservername/niku/nu#action:odf.objectDefinitionAttribute&code=manager_id&partitionCode=NIKU.ROOT&allowCustomAttributes=true&component=pma&object=idea&object_id=5000043

     

     

    Replace # with ? and : with = in the URL and add &debug.data=true at the end of the URL:

     

     

    http://yourservername/niku/nu?action=odf.objectDefinitionAttribute&code=manager_id&partitionCode=NIKU.ROOT&allowCustomAttributes=true&component=pma&object=idea&object_id=5000043&debug.data=true

     

     

    In the xml you will find:

     

    - <attribute active="true" clientFlags="8" code="manager_id" column="MANAGER_ID" dataType="number" editable="true" extendedType="lookup" id="-2" inherited="true" lookupType="BROWSE_PROJMGR" partitionCode="NIKU.ROOT" partitionMode="PARTITION_AND_ANSTRS_DESDNTS" table="INV_INVESTMENTS">

     

     

    OPTION 3: for non-custom attributes

     

    The information can be found in the 'omd' (object meta data) files under $NIKU_HOME/META-INF/compcode/omd/object.xml (where compcode is like 'pma' or 'projmgr' or 'revmgr' and object is like 'project' or 'idea' or whatever it may be)

     

    for example, $NIKU_HOME/META-INF/omd/idea.xml has this definition:

     

    <attribute code="initiator_id" dataType="number" required="true" lookupType="BROWSE_PROJMGR" extendedType="lookup" editable="true" column="INITIATOR_ID" table="INV_IDEAS"> <nls description="Originating Requestor" name="Originating Requestor" languageCode="en"/> <default replace="userId"/> </attribute>