Sunday, October 24, 2010

Option Lists

Option lists are powerful tools we can use to improve and facilitate the check-in process for end-users. At first look, the creation and configuration can be somewhat, intimidating. In this edition of SENA Sound Bites the goal will be to reduce the fear factor from those “confusing” tables and views.

One particular function we can use for an option list is the Tree selection. It is a core piece of Folders but without the performance heavy overhead.

In our scenario, we have a very busy auto parts store and body shop. The shop manager wants the users to have the option at check-in to assign metadata such as the year, make and model of a vehicle that the shop custom fabricates specialty parts for. The shop UCM administrator armed with an arsenal of documents from the 10g and 11g document library takes on the task and hopes to have the project done in a few days. With our help we will reduce that time to a project that can be done before lunch time.

The sections that will be covered are:

Adding information fields,

Table Creation,

Adding Views,

and Relating Views for use in Option list

First let’s begin with creating our information field.

Navigate to Administration > Admin Applets > Configuration Manager > Information Fields

1) Click “Add”

2) Enter Vehicle for Field Name

3) click “OK” through next two windows

4) Click Update Database Design to commit the add field

Now we can begin creating our tables.

While still in Configuration Manager click on the Tables tab

1) Click “Create table”

1) Enter Vehicle_Year in Table Name

2) Enter Vehicle Year for Table Description

3) Add Column Name: Vehicle_Year, with type as varchar, and length 50

4) Add Column Name: Vehicle_Year_id, with type int, enable as Primary Key, and click ok twice to complete creation of table

5) Repeat steps to create remaining tables and columns below.

Table Name: Vehicle_Name

Table Description: Vehicle Name

Column Name: Vehicle_Name,

Column Type: varchar

Column Length 50

Column Name: Vehicle_Name_id,

Column Type: int

enable Primary Key check box

Column Name: Vehicle_Year_id,

Column Type: int

Table Name: Vehicle_Model

Table Description: Vehicle Model

Column Name: Vehicle_Model,

Column Type: varchar

Column Length 50

Column Name: Vehicle_Model_id,

Column Type: int

enable Primary Key check box

Column Name: Vehicle_Year_id,

Column Type: int

Column Name: Vehicle_Name_id,

Column Type: int

After table creation we can go ahead and add the views for our project

While still in Configuration Manager click on the Views tab

1) Click “Add”

2) Select Vehicle_Year table then click “Next”

3) Select all columns then click “Finish”

4) Enter “Vehicle_Year_View” for View Name, “View for vehicle year” for View Description, then click “OK”

5) Repeat steps to add views for Vehicle_Name, and Vehicle_Model.

Now that our views are added we are going to need to add the data that will be displayed for the end users.

Vehicle Year View Data:

While still in the Views section,

1) Select Vehicle_Year_View and click “Edit Values”

2) Click “Add”

3) Enter 2009 for Vehicle_Year and, 1 for Vehicle_id

4) Follow table below to complete remaining values

Vehicle Name View Data:

1) Select Vehicle_Name_View and click “Edit Values”

2) Click “Add”

3) Enter Ford for Vehicle_Name, 11 for Vehicle_Name_id, 1 for Vehicle_id, then click ok

4) Follow table below to complete remaining values

Vehicle Model View Data:

1) Select Vehicle_Model_View and select “Edit Values”

2) Click “Add”

3) Enter F-150 for Vehicle_Model, 111 for Vehicle_Model_id, 11 for Vehicle_Year_id, 1 for Vehicle_Name_id, then click ok

4) Follow table below to complete remaining values

Now that we have populated our views data we can link or relate the newly created tables.

Relations

While still in Configuration Manager click on the Relations tab

1) Click “Add”

2) Enter “Vehicle_Name_Relationship” for Relationship Name, and “Relationship for vehicle name “ for description

3) Select Vehicle_Year from the first drop-down and Vehicle_Year_id from the second drop-down in the Parent Info drop-down

4) Selec tVehicle_Name from the first drop-down and Vehicle_Year_id from the second drop-down in the Child info drop-down, then click “OK”

5) Repeat above steps to add Vehicle_Model_Relationship. In description field enter “Relationship for vehicle model” Select Vehicle_Name in the first drop-down and Vehicle_Name_id from the second drop-down for Parent Info then Vehicle_Model from the first drop-down and Vehicle_Name_id from the second drop-down for Child info

All that is now left to do is configure our field.

Field Configuration

1) Click on Information Fields and select “Vehicle” field.

2) Click "Edit"

3) Check Enable Options List

4) Click Configure

5) Check Use Tree

6) Click “Edit Definition”

7) Click drop-down to build first level of tree. Select “Vehicle_Year_View”

8) Click drop-down to build second level of tree. Select “View_Name_Relationship”

9) Click drop-down to build third level of tree. Select “View_Model_Relationship” and click “Ok” three (3) times to complete tree definition.

Our Tree option list is finally complete. To validate, we just need to go to the check in page.

In the check-in page there is a new field labeled “Vehicle”.


Click “Select” then drill down to make sure our tree displays positive results.

Now suppose the auto shop manager would rather have a dependent option list, where only information is displayed based on a previous selection.

No problem the bulk of the work is complete. All that would need to be done is:

Creation of two new information fields and,

Configuration of option list

Navigate to Administration > Admin Applets > Configuration Manager > Information Fields

1) Click “Add”

2) Enter VehicleYear for Field Name

3) Enter Vehicle Year for Field Caption

3) Check Enable Options List

4) Click Configure

5) Select Use view check-box

6) Select Vehicle_Year_View

7) Check Use Tree then click “OK” through next two windows

While still in Information Fields add the last field

1) Click “Add”

2) Enter VehicleModel for Field Name

3) Enter Vehicle Model for Field Caption

3) Check Enable Options List

4) Click Configure

5) Select Use view check-box

6) Select Vehicle_Model_View

7) Enable Dependent Field

8) Select Vehicle from Depends on field drop-down

9) Click “OK” through next two windows

10) Click Update Database Design to commit the added fields

Last step is to configure the Vehicle Information Field

1) Select Vehicle from the Information Field tab

2) Click “Configure”

3) Select Use view check-box

4) Select Vehicle_Name_View

5) Enable Dependent Field

6) Select VehicleYear from Depends on field drop-down

7) Click “OK” through next two windows

8) Refresh browser

Once again to validate changes go to check-in page and make sure the correct variables are showing.


There you have it, not one but two option lists before lunch time. This was a couple of examples of option lists, with careful planning and always on a “dev” instance first, more powerful and robust lists can be created.

Any questions or comments please reach me at lou.guerrier@senasystems.com.

No comments:

Post a Comment