AnsweredAssumed Answered

Specific users for a Dynamic Query for a lookup field

Question asked by stephen_floyd on Oct 31, 2013
Latest reply on Nov 1, 2013 by stephen_floyd

Hi All

I am trying to create a resource dynamic query where by I only what to have a certain number of users available when I create a lookup field. The code I am using is as follows and I am looking to add something into it so It only picks up a members of a securtiy group that I have created.

SELECT  @SELECT:r.user_id:user_id@
                ,@SELECT:r.full_name:full_name@
                ,@SELECT:r.unique_name:unique_name@
                ,@SELECT:r.unique_name:unique_code@
                ,@SELECT:r.last_name:last_name@
                ,@SELECT:r.first_name:first_name@
        FROM    srm_resources r, cmn_sec_users u
        WHERE   u.id = r.user_id                
          AND   @WHERE:SECURITY:RESOURCE:r.ID@
          AND   @FILTER@
          @BROWSE-ONLY:         
                AND u.user_status_id IN (select id from cmn_lookups where lookup_type='SEC_USER_STATUS' AND lookup_code IN ('ACTIVE','LOCK'))
          :BROWSE-ONLY@

Can anyone help me complete this or even if you have already have some code that fits my requirement? (Only learning SQL)frown

Thanks

Stephen

Outcomes