1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Flex value sets

Discussion in 'Training and Certification' started by sambuduk, Apr 16, 2012.

  1. sambuduk

    sambuduk Forum Advisor

    Likes Received:
    Trophy Points:
    Hyderabad , Telangana
    Need help , Uing Flex value set


    i am working on one Report. The report having 3 parameters

    1. Branch -- Mandatory ( values like b1,b2,b3)
    2. Unit -- Optional ( values like U1,u2,u3 under branchh b1 , U4,U5 are Under b2 , U6,U7,U8 are under b3 )
    3. Employees -- mandatory ( values like e1,e2 are under U1 , e3,e4,e5 are under U2 , e6,e7,e8 under U3 --- etc)

    case 1: If i select Branch value as b1 then in the Unit list of values U1,u2,U3 has to come
    case 2: Then If I select unit value as U3 then Employees list of values e6,e7,e8 has to come

    case 1 and case 2 are working properly ( by using " $FLEX$.BRANCH " and "$FLEX$.UNIT" )

    case 3: here Unit is optional parameter . So if wont select unit value ,then in the Employees list all employees under that branch has to come

    that means if I select b1 branch and wont select any unit then in the Employees list e1,e2,e3,e4,e5,e6,e7,e8 has to come

    for this i used the query like below

    select xe.emp_id
    from xx_emp xe
    where xe.unit_id = NVL:)$FLEX$.UNIT,xe.unit_id)
    AND xe.branch_id = NVL:)$FLEX$.BRANCH,xe.branch_id)

    Once I select the branch value then Unit prameter gets Enabled and once i select the Unit then Employees parameter gets enabled.(It is because of $FLEX$ functionality).

    Here i am getting the problem , Unit is optional parameter so If i dont select the unit parameter Employees pameter wont get enable.So i am unable to enter the value in Employees parameter...

    Anyone Provide me solution for this.....

    Thanks and regards