Tuesday 23 April 2013

How to disable a parameter based on the other parameter


Requirement
-----------
There are 2 parameters, First parameter is independent value set and second parameter is Table value set. First parameter contains two values 'Summarized' and 'Detailed'.Second parameter contains the values like 100,200,300,400, etc.

Now while submitting the concurrent program the second parameter should be in disables mode and when we enter the First parameter value as 'Detailed' then only the second parameter should be enabled. If the First parameter is null or if we enter the value as 'Summarized' then it should be in disabled mode.

Solution
--------
For this we have to take one extra parameter that is dummy parameter along with First and Second parameters.

Parameter Seq,
1.First Parameter
2.Dummy Parameter
3.Second Parameter

1.First Parameter Properties,
Name: First_param
value set: First_param_vs (Table or Independent value set)
required check box: based on the requirement.
Default type/ Default Value : Null
display check box: Checked or based on the requirement.

2.Dummy Parameter
Name: Dummy_param
value set: Dummy_param_vs (Table)
required check box: Checked.
Default type: Sql Statement
Default value: select decode(:$FLEX$.First_param_vs,'Detailed',1,null) from dual
display check box: Unchecked.
Value Set
Table: (select decode(:$FLEX$.First_param_vs,'Detailed',1,null) x from dual) y
id: y.x

3.Second Parameter
Name: Second_param
value set: Second_param_vs (Table)
required check box: based on the requirement.
Default type/ Default Value : Null
display check box: Checked or based on the requirement.
Value Set
Table: Table Name
id: table_name.column_name
where: :$FLEX$.Dummy_param_vs = 1

0 comments:

Post a Comment