Saturday, December 5, 2009

OIM910 - How to use lookup query

The example I am taking here is to have a lookup from a custom table "access_table" containing three

columns access_id, descritption and groupname (this is the column stating which group has access to which

switch)

Steps to follow:

1. Mandatory properties to specify are :
a) Lookup Query e.g.
select distinct a.access_id, a.description from access_table a, usg b, ugp c, usr d where c.ugp_name =

a.group_name and b.ugp_key = c.ugp_key and b.usr_key = d.usr_key and d.usr_status ='Active' and d.USR_LOGIN

= '$Requester Information.User Login$'

b) Column captions e.g. Access ID, Description
This will ensure that in the lookup table displayed in UI will have two columns Access Id and description.

c)Columns names e.g. ACCESS_ID,DESCRIPTION, these are the columns specified in the select query.
ACCESS_ID AND DESCRIPTION must have its own lookup code, otherwise it can not be inserted as
columns names, so let's say ACCESS_ID AND DESCRIPTION have their lookup code shown below:

code : Users.UDF.Access_id
field: ACCESS_ID
lookup type: field type

code: Users.UDF.DESCRIPTION
field: DESCRIPTION
lookup type: field type



In order to make the lookup query work, we need to the corresponding lookup filed in

"xlWebAdmin.properties",
otherwise, the pop-up window(lookup window) will not show captions and values!
===================================================================================
lookupfield.header.users.udf.access_id=Access ID
lookupfield.header.users.udf.description=Description
===================================================================================

Noted the captions have been converted to LOWER CASE and BLANK SPACE has been repaced with "-". Put in

section "LOOKUPFIELD column headers".

The LOOKUP FILED HEADER IS BASED ON LOOKUP CODE! NOT THE COLUMN NAME.


d) Lookup column name e.g. ACCESS_ID, this is the column that is put in the textfield associated with

lookup field.

e) Column widths e.g. 25,100 This is the column width in table

No comments:

Post a Comment