There is a requirement that Dynamically enabling and disabling Concurrent Program Parameters.
Let a concurrent program has two parameters - Display and Application Name. If the value for Display is 'YES', then Users should be enabled containing names of Applications in a system and if the value for Display is 'NO', then Application Name parameter gets disable.
Initially Application Name parameter is disable.

· If user has selected YES from Display parameter then Application Name value set enabled containing application names.

· If user has selected NO from display then Application Name disabled containing application names.
Navigation: Application developer --> Application --> Validation --> Set
Create an Independent type value set
Nav: Application developer --> Application --> Validation -->Values
XXAA_NONE_DIPLAY_PARAM value set to enable User Value set

To create Concurrent Executable:
Nav : Application developer --> Concurrent --> Executable

To create Concurrent Program:
Nav : Application developer --> Concurrent --> Program
Create concurrent program:
Let Executable Name: XXAA_ENABLE_DISABLE_PARAMETER
Method: PL/SQL Stored Procedure

Click on Parameters.
As first parameter attach XXAA_DISPLAY_PARAMETER value set which provide the options YES or NO.

Here we are using Display Parameter to enable and disable other parameter of concurrent program.
Create a parameter of any name and assign a value set XXAA_NONE_DIPLAY_PARAM of NONE type to it.
Select default type as SQL Statement and in Default type write query as:

When YES means application is selected by display value set then XXAA_NONE_DIPLAY_PARAM value set returns 'Y' otherwise NULL.
All the table type value set which satisfies the where condition 'Y'=:$FLEX$.validation are enable when this query runs and others will remain disable.
Now create value set which should be enable on particular condition:
Navigation: Application developer --> Application --> Validation --> Set
Create Value set XXAA_APPLICATION_NAME of table type:

Write 'Y'=:$FLEX$.XXAA_NONE_DIPLAY_PARAM in where condition so that when validation return Y this value set get enable otherwise remains disable.

Assign XXAA_APPLICATION_NAME value set to the parameters of concurrent Program and save it.
Navigation:
System Administrator --> Security -->Responsibility -->Request

Uncheck the Display check box so that it is hidden from user.

Run the concurrent program by
View --> Requests --> Submit a new Request -->Single Request.
Output :
Here user selects NO from Display value set then Application Name disabled.

Here user selects YES from options value set then application value set get enabled.

1 comment:
Nice Example
Post a Comment