How do i show data from a table in a block [message #80142] |
Thu, 15 August 2002 06:50 |
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 |
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 |
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
|
|
|