Home » Developer & Programmer » Forms » List of values
List of values [message #82860] Wed, 09 July 2003 23:00 Go to next message
Anju
Messages: 33
Registered: September 2000
Member
Hi friends,
I need a help in displaying list of value. Is it possible to display a list of value in a list of value? I mean if suppose there is list of value of breakfast, lunch, dinner and when user select suppose breakfast then automatically its sub should pop up example break, coffee, tea, toast, so that user can select the sub of lunch, dinner, breakfast.
Please let me know whether it is possible to do or not.
Thanks in advance,
Anju
Re: List of values [message #82862 is a reply to message #82860] Thu, 10 July 2003 01:29 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
You can refer to form fields in Record Groups. So let' s use your example:
RG_1
----
SELECT meal_id
     , name meal_name
  FROM meals

RG_2
----
SELECT submeal_id
     , submeal_name
  FROM submeals
 WHERE meal_id = NVL(:your_block.meal_id, meal_id)
You have a block with the items meal_id, meal_name (both filled by a lov based on RG_1, submeal_id, submeal_name (both filled by a lov based on RG2).
You disable the submeal items until the user has filled meal_id in some way. After that you can fill the submeal items by the lov based on RG_2 (the NVL isn't really necessary).

That way you have one RG which is dependent on another one. Works at our shop.

HTH,
MHE
Re: List of values [message #82863 is a reply to message #82862] Thu, 10 July 2003 02:20 Go to previous messageGo to next message
sujit
Messages: 94
Registered: April 2002
Member
hi anju,
You can use the SET_RECORD_GROUP_PROPERTY to set the query 'where time =||:item_name
then assign the record group to anather LOV which you have created. Then show the LOV.
Sujit
Re: List of values [message #82867 is a reply to message #82860] Thu, 10 July 2003 09:41 Go to previous messageGo to next message
Julie
Messages: 98
Registered: February 2002
Member
I would use 2 text items for this each with an LOV. Define multiple LOVs for the sub category and use set item property to set the LOV name, depending on the choice made for the first item.
Re: List of values [message #82874 is a reply to message #82862] Thu, 10 July 2003 23:27 Go to previous messageGo to next message
Anju
Messages: 33
Registered: September 2000
Member
Hi Maaher ,
thanks for the reply.
did you mean that one item will be on the top of other and as the user will select one list value that item displayed property will set false and then set the other(sub) item displayed property to true. if this is the answer then how can i set the the displayed property false and true. is there any way to disable item property as user selects lov. please it me know in detail.
Re: List of values [message #82875 is a reply to message #82874] Fri, 11 July 2003 00:21 Go to previous message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Personally, I'm not a great fan of hiding and showing items at runtime. In my experience, it is quite confusing to the end users. Furthermore, it will create an unstable layout: all of the sudden, gaps are created in your layout.

Another drawback of placing one item on top of the other is that you cannot change the hidden item anymore once filled and you're hiding the information the user might want to see when browsing through the records.

I would ENABLE and DISABLE items. So what I would do is place the two LOVs next to each other, so that the navigation sequence would also pass the focus from the "parent" to the "child". Once the parent filled, the child becomes enabled and you can TAB to it, which (IMHO) is quit intuitive. If an item is disabled, the TAB will pass the item without giving it the focus.

Item properties can be set at runtime: Set_Item_Property, Set_Item_Instance_Property,...
Look up the details in Forms Help, create a dummy form and play around a little.

MHE
Previous Topic: Short cut key for LOV in forms9i
Next Topic: Cancel Query Mode
Goto Forum:
  


Current Time: Thu Mar 28 03:28:23 CDT 2024