Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

set_block_property (default_where)

Status
Not open for further replies.

jasperwasper

Programmer
Dec 1, 2002
2
US
I'm trying to open a form based on a value in a previous form (block)(Product). The 2 blocks do not have a relationship between them. The second form(Orders) will have multiple records to display. Basically, I need to show all Orders that have a particular Product # in them.
I was told I could use the set_block_property to do this..but have had no luck????
 
What do you mean by "no luck"? Any errors? Are you talking about different forms or just difefrent blocks?
 
Thanks for responding! It's 2 different forms, based on 2 different blocks(and base tables). My code generates no errors but when the second form opens I do get a message in the status bar at the bottom that the order id (key) must be entered. It does not populate my records..nothing happens! Here's my code - it's called from a button :

PROCEDURE Pop_Order( blk_name IN VARCHAR2 )
IS
sWhere VARCHAR2(1000);
blk_id Block;

BEGIN
blk_id := Find_Block('blk_order');
sWhere := ':blk_product.id = s_item.product_id and s_ord.id = s_item.ord_id';
IF NOT Id_Null(blk_id) THEN
Set_Block_Property(blk_id,DEFAULT_WHERE,sWhere);
Execute_query;
ELSE
Message('You have a problem!');
RAISE Form_Trigger_Failure;
END IF;
END;
 
I do not know the names of your blocks, but if blk_product is the name of the block in another form, THIS form knows nothing about blk_product.id value. In this case you may pass it as parameter or via global variable. If blk_product.id is table column, then you shouldn't use colon.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top