...List ITems.. and window Close Events [message #137854] |
Sat, 17 September 2005 13:10 |
orcl_dba
Messages: 84 Registered: March 2005
|
Member |
|
|
HI..
I would be highly thankful to uyou if you can tell me that
I want that whenver user selects an item from a tlist that item is shown in the text box. and then i can run a qquery based of that item from the database.
I think that Get_list_item_label or get_list_item_value is useless
the reason is that how can i know which item is selectd..
is there anything like ..
x:=get_list_element_selected and then we can compare
if = 'Lahore' then go to ...
else
....
i mean otherwise for 100 elements i have to write too many ifs. that
IF get_list_element_label/value = x then do thih s
if ...
iff
isnt it ..
Second question is that can i stop closing of window if user press x button on the right top corner..
whenever application run user should use exit to close it instead of using X window buton
hope to see replies..
thanx alot in advance. .to all ofyou
|
|
|
|
Re: ...List ITems.. and window Close Events [message #137967 is a reply to message #137854] |
Mon, 19 September 2005 03:19 |
orcl_dba
Messages: 84 Registered: March 2005
|
Member |
|
|
....
well i cant use LOV reason being user will really feel unease seleting a city from the LOV
had the cities been listed in the Tlist.. user can easily view them and while selecting them to display any other information based on the cities.
LOV on the other hand looks odd as it pops up and then does not actually show all the citiies.
LOV is most likely the best when user knows the names of all cities and cna user LOV for search purpose... as well.
but in this case user is not totally aware of the number and names of cities that are in the datbaase ...
so we need him to have a good and clear look at the names before selecting ..
Am i right..
i mean i thin it is ..
hope to see some early replies on the matter..
why cant we obtain any value of selected item.. in Forms...
My little knowledge with Forms is the one that is disturbing you ppl
Sory for that as
bR
|
|
|
|
|
Re: ...List ITems.. and window Close Events [message #138165 is a reply to message #137854] |
Tue, 20 September 2005 09:35 |
orcl_dba
Messages: 84 Registered: March 2005
|
Member |
|
|
either you or most probably i m not gettnig it
well u said .
ur blockname.list_item_name..
well sir. .i thats what i know that you have to assign the value of the selected item. but how do you know which element user has selected..
When list Changed trigger fine..
what shoudl isay ..
if list1.elementvalue = kfjjlasdf
then it means thati have to put 20 or more ifs if the number of elemets are 20 or more..
isnt there any way that we get a selected element..
like for .eq.
if list.selected element_label = A then :text1 = Hello
etc...
means user can click on any city and i want to retireve record for that city..
One way i have told you is that i need to put ifs.
so many
isnt there is any simple way ..
another way is LOV..
cuz then i can say that after selecting from LOV..
if :text1 = ABD then :text2= hello
but my managers are not fond of using LOv.. instead they like a list to be presented from where they ccan see and seleted..
Hope i m able to make u understand this time..
thanx alot for bearing for such a simple questions.. aagain and again ..
sorry
BR
|
|
|
Re: ...List ITems.. and window Close Events [message #138236 is a reply to message #138165] |
Tue, 20 September 2005 18:21 |
|
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
Do you have a table which has the 'city' and the 'other data' that you now want to use? If no, as the 'tlist' only returns a single data element, then multiple 'if' statements is the only choice. An LOV with multiple return elements was my alternate solution. If you DO have a table with 'city associated data' then have a 'select' statment based on the 'city' field in your trigger and use it to populate your other fields.
If you currently don't have this table then consider creating it.
Hey, you could probably create a record group with 'city'/'other data' pairs and scan the record group for the returned city and populate your field using the 'other data'.
But this is called 'hard-coding data values' and is frowned upon in good programming circles. Consider adding another columns to your 'city' table.
David
[Updated on: Tue, 20 September 2005 18:22] Report message to a moderator
|
|
|