Re: Dynamic LOV's ???

From: <rono_at_fl.envworld.com>
Date: Mon, 11 May 1998 12:01:44 GMT
Message-ID: <6j6pb8$8oh$1_at_nnrp1.dejanews.com>


I don't believe that solution will quite give you what you need. Since the record group your LOV is based on is not repopulated at each record, it will only contain values from the first record.

Try this:

  1. Set up a dummy record group with the proper column names aliases for each of the three dependent LOV's (SELECT 1 COLUMN1, 2 COLUMN2, etc. FROM SYS.DUAL)
  2. Place a PRE_TEXT_ITEM trigger on each of fields which use the LOVs. In this trigger you need to create a record group, define the proper columns define the proper query, populate the group, then change the LOV to use this group instead of the dummy group. Look up the documentation on CREATE_GROUP, POPULATE_GROUP, etc. for more info on how to do this.
  3. Create a POST_TEXT_ITEM trigger on each of the fields to point the LOV back to the dummy record group, and drop the real record group.

There may be a simpler way around it, but this is how it was taught to me.

  • Ron Olcott, President
  • Interlude Enterprises
  • interld808_at_aol.com

In article <6j27b2$eq3$1_at_nnrp1.dejanews.com>,   osama_gad_at_hotmail.com wrote:
>
> In article <3553579C.50B_at_domain-tech.com>,
> Ed Jennings <jenningse_at_domain-tech.com> wrote:
> >
> > I'm using FORMS 4.5 on an NT platform. I have a series of
> > 4 List Items. The first List Item is populated via a
> > Record Group when the Form is opened. The remaining 3
> > List Items need to have their Lists created dynamically
> > based on the selected values of the previous List Items.
> > i.e. After selecting a value for List Item 1, List Item 2
> > now needs to contain a subset of values that are restricted
> > by the value of List Item 1. After selecting a value for List
> > Item 2, List Item 3 now needs to contain a subset of values
> > that are restricted by the value of List Items 1 & 2.
> >
> > For example, if you were selecting criteria for a map, the first
> > item (country) would contain all countries. Once a country
> > was selected, the second item (state), should contain a list
> > of only the states within the selected country. Likewise, the
> > next item (city), should contain a list of only the cities within
> > the selected country and state.
> >
> > And to make it just a bit more complicated; these items are
> > in a detail block that displays three records at a time. I
> > don't want the other items to become invalid because the List
> > changed. I'd rather that each record could be changed without
> > any impact to the others. Think of it as a lookup table with
> > multiple attributes. It will be queries and then updated in place.
> >
> > Can anyone provide some guidance on how this can be done????
> >
> > TIA
> >
> > Ed Jennings
> >
> > --
> > The opinions expressed here are my own, not those of Domain Technologies
> >
>
> *****************************************
>
> you can write in the select statment in recored group
> in your example in country and state
> assume that you have two tables contry and state
> and country have cont_cd & count_nm and count_cd is a primary key
> you must have in state table a forign key cont_cd and state_cd&state_nm
>
> in country_lov you select cont_cd,cont_nm from country
> and in state_lov select state_cd,state_nm from state where
cont_cd=:contry_cd
> do that and tell me if some thing rong.
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/ Now offering spam-free web-based newsreading
>

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Mon May 11 1998 - 14:01:44 CEST

Original text of this message