Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Hide poplist element depending on another form column

419279May 27 2007 — edited May 31 2007
Hello everyone,

In a nutshell: I’d like to know how to hide (or show) elements in a poplist, depending on the value of another column on the FORM.

I have a FORM where I have the following columns:

1) ISNONSYN…can have values ‘Y’ or ‘N’

2) ISIDSERTAIN…has a poplist (set of static values) with values ‘Y’, ‘N’, or ‘-‘

3) 5 other columns

What I need to is as follows:

If ISNONSYN = ‘Y’ then
* The poplist for ISIDCERTAIN must only show ‘Y’ and ‘N’ in the dropdown. Do not show the ‘-‘
* The 5 columns should be fully updateable
ELSE if ISNONSYN = ‘N’ then
* Default ISIDCERTAIN to the value ‘-‘
* Make ISIDCERTIN and the 5 columns non enterable and non navigable
END IF

So that’s it….

If I come into the form with ISIDCERTAIN having ‘Y’, ‘N’ and ‘-‘ in it’s dropdown…how do I HIDE the ‘-‘ when I scroll to a row where ISNONSYN = ‘Y’? In this situation, the value of ‘-‘ must not be seen in the drop down.

I created a pre-form trigger where I did a
DELETE_LIST_ELEMENT(‘ISIDCERTAIN’,3); to remove the ‘-‘ from the poplist.

It all worked fine with rows having ISNONSYN = ‘Y’, but whenever I scrolled to a row with ISNONSYN = ‘N’, a WHEN-LIST-CHANGED trigger on ISNONSYN will check the value of ISNONSYN. If it = ‘N’ then it will do 2 things to ISIDCERTAIN (as well as making the other 5 columns unenabled):

1) :<blockname>.isidcertain:= '-';
2) set_item_property('<blockname>.ISIDCERTAIN',ENABLED,PROPERTY_FALSE);

BUT... when I try to commit, it says that the value’-‘ is not a valid value for ISIDCERTAIN!

So, I need some way to DELETE_LIST_ELEMENT or ADD_LIST_ELEMENT on the fly for each row – depending on the value of ISNONSYN…unless there is a way to leave ISIDCERTAIN with the 3 values of ‘Y’,’N’ and ‘-‘; but somehow just HIDE the ‘-‘ when ISNONSYN = ‘Y’. Can I modify the WHERE clause somehow?

Any assistance that anyone can give me would be greatfully appreciated...


We’re using FORMS 6. We actually do 100% generation here (must be 1 of the last sites in the world!). We make all our changes in DESIGNER and generate the form from there. But if someone can tell me how to do what I need to do, in FORMS; I should be able to work out how to get it into DESIGNER for generation.

Thankyou…Tony Calabrese, Adelaide, South Australia
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 28 2007
Added on May 27 2007
8 comments
1,331 views