How to Use a Profile Option in a Value Set

2
How to use a Profile 0ption in a Value Set (JFr, September 6, 2010) In some cases, it can be interesting to restrict the values which a user can see within a value set. This can be easily achieved with the use of a profile in the WHERE clause of the value set. For example, we will try to build a value set which shows only the sub-inventories of the current inventory organization. 1°) Step 1: Get the profile name Responsibility: Application Developer > Profile The current inventory organization is stored in this profile option. Tip 1: Name is a unique identifier of the profile option. You need to note its value carefully because you will have to write it without any list of values. 2°) Step 2: Creation of the value set Tip 2: It is recommended to respect some rules for the name of the value set: Begin by XX to distinguish it from the seeded value sets, Special characters accepted: _, $, #, Choose either UPPER or LOWER cases. Tip 3: Change the validation type before saving. This field cannot be modified after. Tip1 Tip2 Tip3

Transcript of How to Use a Profile Option in a Value Set

Page 1: How to Use a Profile Option in a Value Set

How to use a Profile 0ption in a Value Set (JFr, September 6, 2010)

In some cases, it can be interesting to restrict the values which a user can see within a value set. This can be easily achieved with the use of a profile in the WHERE clause of the

value set.

For example, we will try to build a value set which shows only the sub-inventories of the

current inventory organization.

1°) Step 1: Get the profile name

Responsibility: Application Developer > Profile

The current inventory organization is stored in this profile option.

Tip 1: Name is a unique identifier of the profile option. You need to note its value

carefully because you will have to write it without any list of values.

2°) Step 2: Creation of the value set

Tip 2: It is recommended to respect some rules for the name of the value set:

• Begin by XX to distinguish it from the seeded value sets,

• Special characters accepted: _, $, #,

• Choose either UPPER or LOWER cases.

Tip 3: Change the validation type before saving. This field cannot be modified after.

Tip1

Tip2

Tip3

Page 2: How to Use a Profile Option in a Value Set

3°) Step 3: Creation of WHERE clause

Table Name can make reference to an eBS Table, a view, or a custom table (seen by APPS)

Tip 4: Use the list of values to populate the other fields. If you don’t use the list of values you will have to enter the name and the type for Value, Meaning and ID fields (risk of mistake).

Tip 5: Test button controls the table name, the columns names but it doesn’t check the profile clause and the profile name.

Tip 6: Use the value of the field Name in the profile form (Step 1).

If the SQL statement is too complex, you can create a view and use it for the value set Clauses GROUP BY, HAVING, SUB QUERY, UNION, UNION ALL, MINUS, INTERSECT are not supported.

You can have a custom table in the list of values if it has been declared with AD_DD.register_table and AD_DD.register_column.

This value set can be used in a Descriptive Flex Field, a Key Flex Field, or to validate a parameter of a Concurrent Program.

In the same way, if you want to select the values depending on the Operating Unit you can use the following clause: WHERE ORG_ID = :$PROFILES$.ORG_ID.

- The column ORG_ID is present in all tables managed by Operating Unit. - In the profile ORG_ID is stored the current Operating Unit.

Tip 4

Tip 6

Tip 5