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.
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
Thanks Dave for your immediate response. i have used columns like,
if you can tell me how i can make them numeric that would help me.
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!)
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.
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)
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.
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.
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?
Good-practice is to make ids or codes the hidden-key not data-values (full name).
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
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.
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.