LOV with more than one child value issue [message #643078] |
Mon, 28 September 2015 12:44 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/0252e3a272a99a5dcb5e9b53b4bcb61a?s=64&d=mm&r=g) |
teagemini
Messages: 5 Registered: November 2014 Location: Nova Scotia
|
Junior Member |
|
|
I've created a form so that once a user puts in a client number, they then choose an item from the LOV list. One item on the LOV can have more than one record returned. Example: A client may have two open records in different fitness clubs so when the user chooses the fitness club option in the LOV, it will error as there are two different fitness courts open for this client. I have an error trap I put in for testing so I can carry on developing the application for now.
Ideally I would like to have another option box automatically open when there is more than one record with the list of the two fitness club names for the user to then choose and this option would be on the form. I'm a newbie in Forms and would appreciate if anyone could point me in the right direction on this. Can a dynamic LOV be created at runtime or is this not feasible?
Thank you in advance...
|
|
|
Re: LOV with more than one child value issue [message #643085 is a reply to message #643078] |
Mon, 28 September 2015 16:05 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Quote:
... once a user puts in a client number ...(who) may have two open records in different fitness clubs so when the user chooses the fitness club option in the LOV, it will error as there are two different fitness courts open for this client
What is "it" (that will error)? I presume that it is a trigger.
If so, which one and how it looks like?
What error is it? Too-many-rows, I guess.
If so, does it mean that you manually fill some items? Do they belong to the same block as "client number" and the "option" item? As you can't do it in a single SELECT ... INTO (because of the too-many-rows error), another option is to use a loop. The simplest one is a cursor FOR loop. You'll need to CREATE_RECORD, remember client number and the option chosen in the first record, copy them into new record and the fill the rest of the items.
If I was on the wrong track, could you explain it once again, possibly with some more details? A screenshot is welcome too.
|
|
|
|
|
Re: LOV with more than one child value issue [message #643118 is a reply to message #643116] |
Tue, 29 September 2015 09:48 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Is there any reason why you can't simply make the initial LOV show enough data to allow users to choose straight away?
What is the relationship between the LOV contents and the items in the datablock?
When the user picks data from the second LOV does it populate an additional item in the record? Or something else?
|
|
|
Re: LOV with more than one child value issue [message #643120 is a reply to message #643118] |
Tue, 29 September 2015 10:11 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](//www.gravatar.com/avatar/0252e3a272a99a5dcb5e9b53b4bcb61a?s=64&d=mm&r=g) |
teagemini
Messages: 5 Registered: November 2014 Location: Nova Scotia
|
Junior Member |
|
|
There isn't a way that I can make the LOV show one return of data right away. I have other options that the user can use as well but it's just this one that can return more than one row of data.
The user just wants to put in a client number on the application, then choose whether it's a fitness club (or one of another 5 options), then they want the address of the fitness club that they picked to populate a letter in Oracle Reports. As both fitness club records are active, I can't code it so that it only returns one option.
|
|
|