home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!decwrl!oracle!unrepliable!bounce
- Newsgroups: comp.databases.oracle
- From: mclark@us.oracle.com
- Subject: Re: Implementing selectable LOV, how to...
- Message-ID: <1992Aug13.030611.1@us.oracle.com>
- Followup-To: comp.databases.oracle
- Lines: 54
- Sender: usenet@oracle.us.oracle.com (Oracle News Poster)
- Nntp-Posting-Host: devvms.us.oracle.com
- Organization: Oracle Corporation, USA
- References: <1992Aug4.164432.12930@unixg.ubc.ca>
- Date: Thu, 13 Aug 1992 11:06:11 GMT
- X-Disclaimer: This message was written by an unauthenticated user
- at Oracle Corporation. The opinions expressed are those
- of the user and not necessarily those of Oracle.
-
- In article <1992Aug4.164432.12930@unixg.ubc.ca>, george@unixg.ubc.ca (George chow) writes:
- > Hello,
- > I'm trying to implement a LOV from which a user is allowed to pick multiple
- > values. I'm thinking of something similar to the <Select Columns> in
- > SQL*Forms's Default Block form. Other than that is is a pop-up page, I have no
- > real idea of how to approach this. So has anyone here tried to do anything
- > similar to this?
- >
- > George
- >
- >
- Hi George,
- This situation normally occurs when you have the following:
-
- Table A >---- Intersecting Table A/B ----< Table B (Pathetic attempt at E-R)
-
- Where, say, Table B has a small number of rows, and we wish to populate Table
- A/B (The intersecting table with keys from A and B)
-
- One way to do this is to Create a Block based upon A to enable the user to
- Query which "A" they would like to nominate the "B"'s for.
-
- A short discussion of this technique follows:
-
- Then Create a Block based upon "B".
-
- Make Block "B" the Detail for Block "A" (This is why we rely on the small
- number of rows in "B")
-
- Write a PRE-QUERY Trigger on BLock "B" to Highlight the Row Returned if a row
- exists in the intersection Table A/B. (using DISPLAY_FIELD)
-
- Write trigger code to stop inserts/deletes in Block "B".
-
- Nominate a function key to be the "Select a Row" key.
- Make this key change some detail in Block "B". This will force an Update in
- the Block which we can use to write/remove a row from the intersecting Table
- "A/B".
- Also make the key highlioght/de-highlight the row using display_field.
-
- Re-Write the ON-UPDATE Processing to Insert/Delete the Row in the
- intersecting Table "A/B" depending upon whether the user has seleceted a new
- row or de-selected an existing row.
-
- Re-write the ON-LOCK Processing so that it does not lock table "B"
-
-
- This was written in a Rush, so give me a Mailer if you have any problems
- (Assumes forms 3.0)
-
- Thanks
-
- Mark Clark (mclark@au.oracle.com)
-
-