Thursday, July 15, 2021

Value Sets: Independent, Dependent, Table

 

To demonstrate different types (Independent, Dependent and Table) of value set let’s first define a concurrent program.

1. Define Executable.
Navigation: Application Developer > Concurrent > Executable

Conc Prog 1

Enter Information as below
Note: You don’t really need to have PLSQL package defined for this demo.

Conc Prog 2

Save it.
Navigation: Application Developer > Concurrent > Program

Conc Prog 3

Enter Information as below

Conc Prog 4

Save it.

Assign this Concurrent program to “Application Developer” responsibility by adding it to Request group

Conc Prog 7

Note: Form more information about defining concurrent program and adding it to request group follow the below tutorial
http://erpschools.com/articles/concurrent-program-registration-and-add-it-to-request-group

Now Start Defining Value Sets.

Independent Value Set:

Navigation: Application Developer > Application > Validation > Sets

value sets 1

value sets 2

Enter information as below

value sets 3

Save it.

value sets 4

Create Values for the value set we defined above

Navigation: Application Developer > Application > Validation > Values

value sets 5

Enter information as below

value sets 6

Save it.

Attach this value set to Concurrent program parameter

Navigation: Application Developer > Concurrent > Program > Parameters

Conc Prog 4

Enter information as below

Conc Prog 5

Save it.

To test the value set try submitting the concurrent program

Navigation: Application Developer > View > Requests > Submit New Request > Single Request > OK

Conc Prog 9

Conc Prog 10

Enter Concurrent Program Name that we defined at the beginning of this tutorial

Conc Prog 11

Click on LOV button to see the values available for this parameter.

Conc Prog 12

———————————————————————————

Dependent Value Set

To define a Dependent value set we also need one Independent value set.

Example: To List down States in a Country we need to have list of Countries for which states need to be defined.

First Define list of countries in a independent value set

Navigation: Application Developer > Application > Validation > Sets

value sets 8

Enter Values for the above value set

Navigation: Application Developer > Application > Validation > Values

value sets 9

Enter Values in the below screen

value sets 10

Now define another Value set

Navigation: Application Developer > Application > Validation > Sets

value sets 11

Click Edit Information Button to link this Dependent Value set with Independent Value set defined in previous step

value sets 12

Enter Values for each country

Navigation: Application Developer > Application > Validation > Values

Ensure to Select Country name in “Independent Value” field before click Find.

value sets 13

Click Find and enter states for Country India

value sets 14

Save it

Now repeat the above two steps to enter states of country USA

value sets 15

Ensure to select country as USA before clicking Find button

value sets 16

Save it.

Navigate to Concurrent Program Parameters screen and enter Country parameter as shown below

Navigation: Application Developer > Concurrent > Program > Query our Concurrent Program > Parameters

Conc Prog 13

Save it.

Add another parameter to link State Value set as shown below

Conc Prog 14

Save it.

To test “Dependent Value set” navigate to concurrent program submission window

Conc Prog 15

Select country and you can observe that list of values in State parameter will change automatically depending on value select in Country parameter field.

Conc Prog 16

Conc Prog 17

——————————————————————————–

Table Type Value Set

Navigation: Application Developer > Application > Validation > Sets

value sets 18

Select Validation type as “Table” and click Edit Information button

Enter information as below

value sets 19

Click Test button validate the information that is entered

value sets 20

Navigate to Concurrent Program Parameters screen and add fourth parameter

value sets 21

Navigate to Concurrent Program Submission window to check the list of values in Parameter-4

Click LOV button on Order Number field to see list of values available from OE_ORDER_HEADERS_ALL table.

These values change dynamically as data changes in the OE_ORDER_HEADERS_ALL table.

Conc Prog 18

How to Create a Dependent Parameters using Dependent Value set

 

Definition: A dependent value set is similar to an independent value set, except that the available values in the list and the meaning of a given value depend on which independent value was selected in a prior segment of the flex field structure. You can think of a dependent value set as a collection of little value sets, with one little set for each independent value in the corresponding independent value set. You must define your independent value set before you define the dependent value set that depends on it.

For example let’s take two values sets:
1. XX_CAR_MAKES (A Value set for different Car Makes (manufacturers))
2. XX_CAR_MODEL (A Value set for different Car Models of a Car Make)The value set values should look like the below structure

Car Make (XX_CAR_MAKES)Car Model (XX_CAR_MODEL)
Maruthi Suzuki
Alto 800
Swift
Wagon R
Hyundai
Eon
i10
i20
Verna
Tata
Nano
Indica
Manza

Since car model is dependent on car make, car model value set XX_CAR_MODEL should be defined as dependent value set and car make value set XX_CAR_MAKES should be defined independent value set.

Step 1: Create Independent Value Set

Create a value set XX_CAR_MAKES as shown in the below screen shot

1

Step 2: Create Dependent Value Set

Create a value set XX_CAR_MODEL as shown in the below screen shot

2

3

Step 3: Add Values for Independent Value set

Navigate to System Administrator responsibility –> Application –> Validation –> Values
Enter value set name as XX_CAR_MAKES and click on Find button

4

Enter the values as shown in the below screen shot

5

Step 5: Add values for Dependent Value Set

Navigate to System Administrator responsibility –> Application –> Validation –> Values
Enter value set name as XX_CAR_MODEL, Independent Value as ‘Maruthi Suzuki’ and click on Find button

6_0

Enter different car models of Maruthi Suzuki as values as shown in the below screen shot

6

Similarly enter list of values for other independent values of dependent value set

7

8

Steps 6: Assign value sets to Flex Fields or Concurrent Program parameters

9

10

11

12

You can use this method when list of values are small and fixed in number. If list of values are more and values should come dynamically then we can use $FLEX$.XX_VALUE_SET_NAME method.