|
|
|
|
Re: Can not select different values from the list item [message #441992 is a reply to message #441990] |
Thu, 04 February 2010 04:39 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Nothing is to be stored; this is just a part of a little bit wider story, where IDs are calculated upon certain conditions and manipulated in the form. Everything was fine in SQL*Plus, but not within the list item.
Finally, I don't even need the record group; this code does the job (at least, so far):
declare
list_id item := find_item('novi_ugovor.list_vug');
begin
clear_list(list_id);
for cur_r in (select rownum rn, id from vrsta) loop
add_list_element(list_id, cur_r.rn, cur_r.id, cur_r.id);
end loop;
end;
Thank you again!
|
|
|
Re: Can not select different values from the list item [message #441994 is a reply to message #441962] |
Thu, 04 February 2010 04:54 |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
You might not be storing it in the db, guessing it's not a db item, but the list item has to hold a value (which is the list_value) and that value doesn't have to be the same as what's on screen (as that's the list_label).
If you change your select in the original code to:
'select id, id from vrsta';
you'll get the same results as your new code.
As when you use a record_group the first item in the select becomes the list_label and second becomes the list_value.
You ended up with the same list_value for each so it got confused, and since it'll be the list_value you get when you check the value of the item in code it really needs to be different.
|
|
|