Home » Developer & Programmer » Forms » Populate List - Dynamically (Forms 10g 10.1.2.3.0)
icon5.gif  Populate List - Dynamically [message #497016] Thu, 03 March 2011 12:36 Go to next message
Kevin58
Messages: 79
Registered: January 2009
Member
Hi Gurus!

I've got a situation where I need to populate a list box of lab numbers when the user selects a matching date received date.

Right now it only works when the user presses enter on the field used to accept a date.

It also works when a user fills in date and then clicks twice on the listbox of lab numbers. (assuming there are some records for the date in question).

Both fields are in a data block that is not connected to a table.
Here is the when-mouse-doubleclicked trigger code:
LAUNCH_CALENDAR('DISPLAY.DATE_BEAN');
IF :DISPLAY.DATE_RECEIVED IS NOT NULL THEN
  GO_ITEM('display.list_labno');
  --POPULATE_LIST_ITEMS('date_received_records','display.list_labno');
  do_key('list_values');
  --SYNCHRONIZE;
  --Execute_Trigger('KEY-ENTER');
  --GO_ITEM('DISPLAY.LIST_LABNO');
  --DO_KEY ('LIST_VALUES');
END IF;


As you can see we have tried several different triggers to get this to work with a calendar date chooser (java bean). The bean works and allows for a date to be returned. However, it does not want to populate the listbox.

Any ideas?
Re: Populate List - Dynamically [message #497816 is a reply to message #497016] Mon, 07 March 2011 06:16 Go to previous messageGo to next message
Kevin58
Messages: 79
Registered: January 2009
Member
Any way to programmaticaly press enter on :display.date_received?

[EDITED by LF: removed quote of the whole previous message]

[Updated on: Mon, 07 March 2011 06:57] by Moderator

Report message to a moderator

Re: Populate List - Dynamically [message #497827 is a reply to message #497816] Mon, 07 March 2011 06:57 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
NEXT_ITEM;
might do that.
Re: Populate List - Dynamically [message #497846 is a reply to message #497827] Mon, 07 March 2011 09:19 Go to previous messageGo to next message
Kevin58
Messages: 79
Registered: January 2009
Member
What trigger would I place the 'next_item'?

Post-Change trigger is protected.

The launch_calendar procedure works independently from the form.
So the code below it would execute before a date was selected.

[Updated on: Mon, 07 March 2011 09:23]

Report message to a moderator

Re: Populate List - Dynamically [message #497910 is a reply to message #497846] Mon, 07 March 2011 15:02 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I re-read your initial question.

Did you try WHEN-VALIDATE-ITEM (instead all the triggers you tried so far)? I might do the job (and won't require anyone to press <Enter>). If you, however, insist on NEXT_ITEM built-in, note that it is a restricted procedure so you can't use it in any trigger that fires in response to navigation.
Re: Populate List - Dynamically [message #498043 is a reply to message #497910] Tue, 08 March 2011 06:26 Go to previous message
Kevin58
Messages: 79
Registered: January 2009
Member
Littlefoot wrote on Mon, 07 March 2011 15:02
I re-read your initial question.

Did you try WHEN-VALIDATE-ITEM (instead all the triggers you tried so far)? I might do the job (and won't require anyone to press <Enter>). If you, however, insist on NEXT_ITEM built-in, note that it is a restricted procedure so you can't use it in any trigger that fires in response to navigation.


I'll give that trigger a try. Hey it works!
On to other issues.
Thanks for the help! Smile

[Updated on: Tue, 08 March 2011 08:08]

Report message to a moderator

Previous Topic: run sql file from from forms
Next Topic: Forms 4.5 to 6i
Goto Forum:
  


Current Time: Tue Sep 17 05:10:28 CDT 2024