Home » Developer & Programmer » Forms » How do i show data from a table in a block
How do i show data from a table in a block [message #80142] Thu, 15 August 2002 06:50 Go to next message
walterdude
Messages: 5
Registered: August 2002
Junior Member
When I compile and run a form it should show the first record from a table in the text-fields but all the fields are empty. How do i get the data from my table to show in the fields in the block?
Re: How do i show data from a table in a block [message #80148 is a reply to message #80142] Thu, 15 August 2002 14:29 Go to previous messageGo to next message
Tyler
Messages: 123
Registered: January 2002
Senior Member
If you are using db items... when-new-form-instance - execute_query;

or if stand alone items...

when-new-form-instance-
select ... into :form_item from ... where ...

or you could also change the "default_where", and then execute, which will populate the block with your dynamic values.
Re: How do i show data from a table in a block [message #80155 is a reply to message #80142] Thu, 15 August 2002 22:56 Go to previous message
Victoria
Messages: 152
Registered: July 2002
Senior Member
Hi
You can use
if your block is database block,(inside when-new-form-instance trigger)
set_item_property(block_name,default_where,place your where condition here enclosed within single quotes)
execute_query;
set_item_property(block_name,default_where,'');
else
u can use
select col1,col2 into :blockname.text_item1,:blockname.text_item2 from tablename where 'place your where condition'

Regards
Victoria
Previous Topic: *** Problem SET_ITEM_PROPERTY ***
Next Topic: Call SQL*Plus
Goto Forum:
  


Current Time: Mon Sep 27 09:20:36 CDT 2021