Home » Developer & Programmer » Forms » cascading prompts
cascading prompts [message #145514] Thu, 03 November 2005 10:19 Go to next message
bdrufner
Messages: 42
Registered: August 2005
Location: Home of the Mardi Gras, N...
Member
Forms 9.0.4, RDBMS 9.2

I am a beginner in Forms.

I have three list of value (LOV) fields: Vendor, Title and Edition. This is a library application tracking acquired inventory so an example of field values might be Vendor = Microsoft, Title = Office, Edition = Advanced. Please note the sequence of fields.

I would like to make the values available in one field dependent to the value chosen by the user from the previous field.

Example: When the user selects Microsoft as the Vendor in the VENDOR LOV, only those title values associated with Microsoft are available for the user in the TITLE LOV. Additionally, if the user picked "Office" as the TITLE field, only those EDITION values that were associated with "Office" would be available to the user to select in the EDITION LOV.

In a BI tool that I used to use, (Business Objects) this was referenced to as cascading prompts.

I realize that the associations between the three LOV fields will have to be built on the back-end.

Please offer any advice / white papers / examples / other "gems of imperial wisdom" on best approach on how to make this happen in Forms.

Thanks
Barry
Re: cascading prompts [message #145589 is a reply to message #145514] Fri, 04 November 2005 00:25 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Just build your three LOVs based on three record groups. For the subordinate record groups then place the 'now populated' field in the slect statement.

For example, 'blk' has three items 'i_vendor', 'i_title', and 'i_edition'.

The 'select' used by the LOV/record_group for 'i_vendor' would be 'select distinct vendor from my_table order by 1'.

The 'select' used by the LOV/record_group for 'i_title' would be 'select distinct title from my_table where vendor = :blk.i_vendor order by 1'.

The 'select' used by the LOV/record_group for 'i_edition' would be 'select distinct edition from my_table where vendor = :blk.i_vendor and title = :blk.i_title order by 1'.

Give that a go.

David
Previous Topic: Problem comes in when-list-change
Next Topic: go_item
Goto Forum:
  


Current Time: Fri Sep 20 01:39:47 CDT 2024