Home » Developer & Programmer » Forms » List problem (10g developer suite win xp)
List problem [message #344953] Tue, 02 September 2008 00:14 Go to next message
durgadas.menon
Messages: 365
Registered: December 2007
Location: Nowhere
Senior Member
Hi,

I have a problem with the list. Attached is the screen shot of my form. As seen I have a list of states in the form. There is a problem with this list, the list of states starts with AL but even if I try to select any other state AL is the one that is selected i.e. If I want to select NJ and click on it AL appears in the column. In short I am not able to select anything except AL (first item). What can be the reason for this malfunction and how to solve it ?

Re: List problem [message #344995 is a reply to message #344953] Tue, 02 September 2008 02:18 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
How are you showing the list? What special code have you written around this item?

David
Re: List problem [message #345028 is a reply to message #344995] Tue, 02 September 2008 03:05 Go to previous messageGo to next message
durgadas.menon
Messages: 365
Registered: December 2007
Location: Nowhere
Senior Member
oopp...I should have written the code in the earlier post..sorry

Here is the WHEN_NEW_FORM_INSTANCE trigger code that I am using to populate the list

declare
	status number;
begin	
        status := populate_group('RC_STATES');	 
	clear_list('LI_STATES') ;
        populate_list('LI_STATES','RC_STATES');
end;


I created a list item on the CANVAS and named it LI_STATES the query used to populate the record (rc_states) is
select state_name, name from states


Would you now know why this is happening?
Re: List problem [message #345301 is a reply to message #345028] Tue, 02 September 2008 20:39 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
I repeat: "How are you showing the list? What special code have you written around this item?"

Why don't you use the built-in 'record_group' instead of doing it dynamically?

David
Re: List problem [message #345356 is a reply to message #345301] Wed, 03 September 2008 03:30 Go to previous messageGo to next message
durgadas.menon
Messages: 365
Registered: December 2007
Location: Nowhere
Senior Member
Thanks for the reply...

Quote:
How are you showing the list?

As shown in the attached screen shot (list_problem.gif - first post) I am showing the list in the canvas . Is this what you meant when you asked 'How are you showing the list'

Quote:
What special code have you written around this item?

I am not writing any special code for this item except the WHEN_NEW_FORM_INSTANCE trigger on the form (previous post).
Quote:

built-in 'record_group'

I searched the online help on this and got these options
Quote:
CHECK_RECORD_UNIQUENESS
CLEAR_RECORD
CREATE_QUERIED_RECORD
CREATE_RECORD

but I am not sure how to use these to populate the list. Can you direct me to some example on how to use record groups internally to populate the list rather than using the dynamic way..
Re: List problem [message #345495 is a reply to message #345356] Wed, 03 September 2008 19:34 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Was this list 'shown' via pressing Ctrl-L (or equivalent function key), by a 'show_lov' in your code, or have you got 'Automatic Display' set on your LOV?

Please confirm that the only code you have written in the WHOLE of your form is in the WHFI trigger.

You can create a record group here -> ./fa/4945/0/

David
  • Attachment: untitled.JPG
    (Size: 27.59KB, Downloaded 205 times)
Re: List problem [message #345533 is a reply to message #345495] Thu, 04 September 2008 00:48 Go to previous messageGo to next message
durgadas.menon
Messages: 365
Registered: December 2007
Location: Nowhere
Senior Member
Thanks for the reply..

I was wondering why LOV came into picture..I was under the impression that I just have to make a list item on the canvas (drag and drop) and use record to populate it, which I tried to do the in WNFI trigger written in the post.

This is not the only code written in the form but this is the only code written which relates to the list item.

I have made a record group (RC_STATES) and used this query in it

select state_name, name from states s1


then wrote the WHEN_NEW_FORM_INSTANCE code to populate the list item.

Please let me know if this was the wrong approach towards using lists.
Re: List problem [message #345543 is a reply to message #345533] Thu, 04 September 2008 01:52 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Create a new 'record_group' and put your select statement into the 'Record Group Query' property.

In your LOV, open 'Column Mapping Properties' and populate the 'Return Item' property with the 'block.item_name' of the item into which you want the selected value to be placed.

David
Re: List problem [message #345547 is a reply to message #345543] Thu, 04 September 2008 02:38 Go to previous messageGo to next message
durgadas.menon
Messages: 365
Registered: December 2007
Location: Nowhere
Senior Member
Thanks for the reply...I did as you had told.

- Removed the trigger which populates the list item (WNFI)
- created a LOV (LOV_STATES) on the query which gave the states name and in that put the return item (column_mapping.gif) as LI_STATES (column name)

but now I am not able to see the states name in the list, screen shot attached (list_error.gif). Would you know what went wrong?
Re: List problem [message #345548 is a reply to message #345547] Thu, 04 September 2008 02:39 Go to previous messageGo to next message
durgadas.menon
Messages: 365
Registered: December 2007
Location: Nowhere
Senior Member
No Message Body
Re: List problem [message #345550 is a reply to message #345548] Thu, 04 September 2008 02:44 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Did you create the record_group? You have to have the two objects - a record_group and an LOV that uses it.

David
Re: List problem [message #345553 is a reply to message #345550] Thu, 04 September 2008 02:51 Go to previous messageGo to next message
durgadas.menon
Messages: 365
Registered: December 2007
Location: Nowhere
Senior Member
YES...as you can see in the attachment (column_mapping.gif). There is a LOV - LOV_STATES and a Record Group - RC_STATES both the objects are created properly....
Re: List problem [message #345799 is a reply to message #345553] Thu, 04 September 2008 19:36 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
The 10g help is not showing the 'record group' usage in a clear manner. Open the help for Forms 10g, select 'Index' in the left panel, type 'record group'. First review 'Record Group Property', then 'Record Group Properties', and then the other entries starting with 'Record Group'.

Please post the 'select' statement that you are using for your 'record group'. You should have at least two columns.

Search this forum for 'record group column' and you will find threads like http://www.orafaq.com/forum/m/328587/67467/?srch=record+group+column#msg_328587

David
Previous Topic: ACTIVE AND INACTIVE BUTTON.......trigger fir after each charcter and MADA (merged)
Next Topic: Hierarchical tree icons
Goto Forum:
  


Current Time: Thu Dec 08 10:42:58 CST 2016

Total time taken to generate the page: 0.19846 seconds