Clarity

Expand all | Collapse all

List of fields using a lookup

Jump to Best Answer
  • 1.  List of fields using a lookup

    Posted 02-09-2017 02:10 AM

    Hi,

     

    I'm trying to get list of attributes across objects that use an user defined lookup. Is there a way to get list of attributes that use a particular lookup at the DB level rather than to look into the object attributes? If yes, can you please provide me the table name?

     

    Thanks in advance.

     

    Monica



  • 2.  Re: List of fields using a lookup

    Posted 02-09-2017 04:11 AM


  • 3.  Re: List of fields using a lookup

    Posted 02-09-2017 05:01 AM

    Dave_3.0 Hi, that was helpful. But what I expect is that I want to generate list of lookup attributes A,B,C , all using the same lookup X. Is there a way to extract it?

     

    Monica 



  • 4.  Re: List of fields using a lookup

    Posted 02-09-2017 05:06 AM

    the code in the "Where is a lookup used?" part of that TIP I linked is what you should be looking at, specifically the 'Object' bit if you are only interested in objects/attributes



  • 5.  Re: List of fields using a lookup

    Posted 02-09-2017 05:11 AM

    Hi Monica,

     

    Try this SQL Query:

     

    select distinct object, attribute from odf_multi_valued_lookups
    group by object, attribute
    order by object, attribute;

     

    This should give us a list of all attributes for each object, where multi valued lookups are present.

     

    Suhail.



  • 6.  Re: List of fields using a lookup

    Posted 02-09-2017 05:54 AM

    Dave_3.0 suhail-sayed Great, thank you for the input guys! Kudos



  • 7.  Re: List of fields using a lookup

    Posted 02-09-2017 04:51 AM

    Hi Monica,

     

    Also, check odf_multi_valued_lookups to see if you get the information that you need.

     

    Suhail.



  • 8.  Re: List of fields using a lookup
    Best Answer

    Posted 02-09-2017 09:36 AM

    For custom attributes, have a look at table odf_custom_attributes. It has a column called LOOKUP_TYPE which will give the lookup used by any custom attribute.



  • 9.  Re: List of fields using a lookup

    Posted 02-10-2017 12:52 AM

    paish01  there a way to identify the same with OOB attributes and objects too?



  • 10.  Re: List of fields using a lookup

    Posted 02-10-2017 03:39 AM

    @Monica - I have given you the answer TWICE now not sure if I am going to continue answering the same question again and again.

     

    lets have one last try then... if you look at the thread I pointed you at (TWICE now), at the SQL that I pointed you  at ( here I'll make it easy for you here is a direct link https://communities.ca.com/thread/28007106#comment-241821671 ) that contains the answer for objects, stock attributes, custom attributes (i.e. the partial answers given by Paul.2 (odf_custom_attributes) and Suhail (odf_multi_valued_lookups - but Suhail's only tells you where there is some data in the column rather than the column definition) above), NSQL queries and Report/Job definitions.

     

    (apologies for the somewhat passive/aggressive response)



  • 11.  Re: List of fields using a lookup

    Posted 02-28-2017 11:24 PM

    Dave_3.0, the thread that you gave was indeed of great help, which I've bookmarked for recursive use and it's that I was expecting odf_custom_attribute table. It's my bad that I missed it in the thread you stated.