Clarity

 View Only
Expand all | Collapse all

lookup to display user's own information

  • 1.  lookup to display user's own information

    Posted Oct 13, 2016 07:24 AM

    Hello everyone,

     

    i want to create a lookup that should display only my name if i click on that, in general whoever clicked on it to see the resource/user name it should show only their name. i had planned to try this with Dynamic niku query, this never looked very easy for me as i am not getting the right data/option/table info for it.

    any help/suggestion/guidance will be much appreciated.

     

    Thanks

    Daya



  • 2.  Re: lookup to display user's own information
    Best Answer

    Posted Oct 13, 2016 08:41 AM

    In your Dynamic Query Lookup, you may use below construct which provides logged in user id to apply filtering:

                @WHERE:PARAM:USER_ID@



  • 3.  Re: lookup to display user's own information

    Posted Oct 13, 2016 03:25 PM

    HI Sridhar

     

    Thanks a lot. This is working fine for me.

    This is just an awesome solution. i was thinking about finding the session related tables and all.

    Thanks again. Have a great week end.

     

    Thanks

    Daya



  • 4.  Re: lookup to display user's own information

    Posted Nov 04, 2016 06:26 AM

    HI Shridhar,

    i am facing one more issue in continuation to the same issue from today.

    if i select my name for this look up that has been assigned to one field. when other user logged in and see that field it shows their name already selected for that field.

    the requirement is only to select the their name for that particular look up/ but here its so happening that if any user select his name , the other user who logged in will see their name selected for this field.

    Please suggest me if i made any wrong settings.



  • 5.  Re: lookup to display user's own information

    Posted Nov 04, 2016 06:53 AM

    Is it possible for you to share lookup NSQL?



  • 6.  Re: lookup to display user's own information

    Posted Nov 04, 2016 06:55 AM

    SELECT @SELECT:u.id:user_id@,
    @SELECT:u.USER_NAME:UNIQUE_CODE@,
    @SELECT:r.id:resource_id@,
    @SELECT:r.first_name:first_name@,
    @SELECT:r.last_name:last_name@,
    @SELECT:r.full_name:full_name@,
    @SELECT:r.person_type:person_type_id@
    FROM srm_resources r,
    cmn_sec_users u

    WHERE u.id = r.user_id
    AND u.id=@WHERE:PARAM:user_id@



  • 7.  Re: lookup to display user's own information

    Posted Nov 04, 2016 08:04 AM

    Just to solve the said problem, you may try below query. 

     

    SELECT @SELECT:u.id:user_id@,
    @SELECT:u.USER_NAME:UNIQUE_CODE@,
    @SELECT:r.id:resource_id@,
    @SELECT:r.first_name:first_name@,
    @SELECT:r.last_name:last_name@,
    @SELECT:r.full_name:full_name@,
    @SELECT:r.person_type:person_type_id@
    FROM srm_resources r,
    cmn_sec_users u

    WHERE u.id = r.user_id
    @BROWSE-ONLY:
    AND u.id=@WHERE:PARAM:user_id@
    :BROWSE-ONLY@

     

    But if you want the same field to be appearing in Object list filter view where it should show all resources, then you may actually enhance the lookup to be parameterized to map to object instance. 



  • 8.  Re: lookup to display user's own information

    Posted Nov 04, 2016 08:17 AM

    Hi Shridhar

     

    its giving me NPT-0102: NSQL statement must define at least one dimension. error.

    i am also trying my best to figure this out. Please suggest if you see  any solution.

    thanks

    Daya



  • 9.  Re: lookup to display user's own information

    Posted Nov 04, 2016 08:26 AM

    This is not expected, after all, we just added Browse only construct. Does the error go away if you remove that construct?

     

    By the way, though it is not related to the error, please add @FILTER@ to the query.



  • 10.  Re: lookup to display user's own information

    Posted Nov 04, 2016 09:24 AM

    Yes Shridhar. you are right. this is working perfectly.

    thanks a lot for your time on this. this saved my effort and frustration:)

    thanks again and have a great weekend.

    Thanks

    Daya