Clarity

Expand all | Collapse all

most of the lookups are not visible when we try to associate a lookup to an attribute

  • 1.  most of the lookups are not visible when we try to associate a lookup to an attribute

    Posted Jan 19, 2017 04:08 AM

    Hello Everyone

     

    I have created a portlet with dynamic nike query as the data source. but while selecting the lookup for an attribute of the nsql query i am not seeing all the lookups in the browse window which i can see them in administration-->data Administration-->lookups.

    Please suggest me if i miss any data/logic in the query or any set up.

     

    Thanks

    Daya



  • 2.  Re: most of the lookups are not visible when we try to associate a lookup to an attribute

    Posted Jan 19, 2017 04:17 AM

    If your attribute in the query is a STRING type then you will only see lookups that return STRINGs

    If your attribute in the query is a NUMBER type then you will only see lookups that return NUMBERs

    etc



  • 3.  Re: most of the lookups are not visible when we try to associate a lookup to an attribute

    Posted Jan 19, 2017 04:36 AM

    Thanks Dave for your immediate response. i have used columns like,

    @SELECT:DIM:USER_DEF:IMPLIED:RES_SKILL:i.UNIQUE_NUMBER:UNIQUE_NUMBER@,
    @SELECT:DIM_PROP:USER_DEF:IMPLIED:RES_SKILL:i.RESOURCE_ID:Person_id@,
    @SELECT:DIM_PROP:USER_DEF:IMPLIED:RES_SKILL:i.RESOURCE_FULL_NAME:RESOURCE_FULL_NAME@,

     

    if you can tell me how i can make them numeric that would help me.

     

    Thanks

    Daya



  • 4.  Re: most of the lookups are not visible when we try to associate a lookup to an attribute

    Posted Jan 19, 2017 04:51 AM

    The application will set the IMPLIED attribute type according to what your query delivers, so I would expect your person_id attribute to be a number and your resource_full_name attribute would be a string (assuming you have not constructed you query to change the datatype in some way - I can't tell what your "i" query looks like!)



  • 5.  Re: most of the lookups are not visible when we try to associate a lookup to an attribute

    Posted Jan 19, 2017 04:57 AM

    Yes you right Dave. How i can make sure that  i am setting up the lookup that is string value/numeric value. Because most of the attributes of my query needs string lookups. i did not see particular setting that would do that.

    any suggestions please.

     

    Thanks

    Daya



  • 6.  Re: most of the lookups are not visible when we try to associate a lookup to an attribute

    Posted Jan 19, 2017 05:26 AM

    I'm just saying that your query needs to return a string attribute if you are trying to use a string-lookup - this is entirely within your control in however you have coded your query.

    You can force the query SQL to return strings (to_char in Oracle, CAST to char in MS-SQL) but I would think that if you have to force data-type conversion then you are doing something else wrong (i.e. the query-datatype is correct, your lookup is wrong)



  • 7.  Re: most of the lookups are not visible when we try to associate a lookup to an attribute

    Posted Jan 19, 2017 06:09 AM

    HI Dave,

    thanks a lot. i created a string lookup that would display only first name, last name and full_name. But this is working till select value, in the filter its not giving me any values, i am debugging it end to end.i'll get back to you if i am not able to find this issue fixed.

     

    Thanks Again

    Daya



  • 8.  Re: most of the lookups are not visible when we try to associate a lookup to an attribute

    Posted Jan 19, 2017 06:24 AM

    Well its the return value ("Hidden Key") of the lookup which needs to match the datatype (and obviously the underlying data value) in the query that you want to use it against.



  • 9.  Re: most of the lookups are not visible when we try to associate a lookup to an attribute

    Posted Jan 19, 2017 06:50 AM

    HI Dave,

     

    Yes you are right. But what i am doing is that, i am making full_name as Hidden key and full_name as display attribute, also in another case, person status id as hidden key and fullName as display attribute, data i am able to pull for filtering, but no specific results are not coming for this selected filter. any mistakes you think i am doing?

     

    Thanks

    Daya



  • 10.  Re: most of the lookups are not visible when we try to associate a lookup to an attribute

    Posted Jan 19, 2017 07:44 AM

    Good-practice is to make ids or codes the hidden-key not data-values (full name).



  • 11.  Re: most of the lookups are not visible when we try to associate a lookup to an attribute

    Posted Jan 19, 2017 01:43 PM

    HI Dave

    i made Full name as hidden key, and the string lookup was available for attribute to associate, then while we select the name in the lookup and click filter i get no data in the portlet. this is one issue.

    as per your recent reply, if i make number/code as hidden key then then the lookup become Lookup-numeric, it will not be available to select under the Manager Name attribute. Not sure how i am understanding the return type of the look up, i am still stuck with this step here.

    Please let me know if you understand my issue or if you need any more detials/screen shots for it.

     

    Thanks a lot

    Daya



  • 12.  Re: most of the lookups are not visible when we try to associate a lookup to an attribute
    Best Answer

    Posted Jan 20, 2017 03:39 AM

    Sorry I'm not answering your question about why your portlet isn't working, but the "problem" with using a descriptive value (e.g. "full name") as a hidden key is that you are not following good data-modelling practice.

     

    Consider if someone changes their name for whatever reason - then your data is broken; your object contains a reference to an old name, the resource record now no longer contains that name - things are broken.

    Whereas if the hidden key had been made to an internal id or "code" (user id or resource id would typically be used), then these things don't tend to change and your data model can cope with people changing names etc. (This is "denormalisailing" the data if you want to read more on it).

     

    and I can't help thinking that your portlet/loookup problems are somewhat related to your "bad" data model though.



  • 13.  Re: most of the lookups are not visible when we try to associate a lookup to an attribute

    Posted Feb 03, 2017 02:17 AM

    HI Dave

    Sorry for the late response from my end. The issue resolved. You are right, i changed the hidden key to integer number and display attribute as full name.

    its working as expected. thanks a lot for your patience on this. I really learnt something from this issue.

     

    Thanks

    Daya