master detail problem [message #661098] |
Tue, 07 March 2017 08:53 |
flanoriko
Messages: 6 Registered: March 2017
|
Junior Member |
|
|
Hello everybody!
I created a form with a master and two detail tables. All these blocks are view based... and one of these views has two tables joined.
I used the wizard to create the relations, but the behaviour is strange... when I create a record in the master block, the first detail block is cleared... but the second
detail block is not... And if I create the second relation first and then the other, they change the behaviour... The second detail block is cleared and the first is not.
I have no clue how to resolve this... I put some "clear_block" in the "on populate details"... but I think it is not safe.
Can anybody help me?
Tks
|
|
|
Re: master detail problem [message #661099 is a reply to message #661098] |
Tue, 07 March 2017 12:34 |
joy_division
Messages: 4963 Registered: February 2005 Location: East Coast USA
|
Senior Member |
|
|
That's not really much to go on.
Did you use the wizard to only create the relations or everything?
Maybe you can show the relation and where they are on the object navigator.
|
|
|
|
|
Re: master detail problem [message #661115 is a reply to message #661112] |
Wed, 08 March 2017 05:48 |
cookiemonster
Messages: 13925 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Maybe:
currel := get_relation_property(currel,
next_master_relation);
should be
currel := get_relation_property(currel,
next_detail_relation);
I'm not in a position to test. You could add alerts to see what both those properties return.
|
|
|
|
|
Re: master detail problem [message #661121 is a reply to message #661118] |
Wed, 08 March 2017 06:48 |
flanoriko
Messages: 6 Registered: March 2017
|
Junior Member |
|
|
Nothing.
currel := get_block_property(trigblk,
first_master_relation);
WHILE currel IS NOT NULL
LOOP
curdtl := get_relation_property(currel,
detail_name);
IF get_block_property(curdtl,
status) <> 'NEW' THEN
go_block(curdtl);
check_package_failure;
clear_block(no_validate);
IF :system.block_status <> 'NEW' THEN
RAISE form_trigger_failure;
END IF;
END IF;
-- currel := get_relation_property(currel,next_master_relation);
currel := get_relation_property(currel,next_detail_relation);
message(' currel '||currel);
END LOOP;
[Updated on: Wed, 08 March 2017 06:48] Report message to a moderator
|
|
|
|
|
Re: master detail problem [message #661131 is a reply to message #661130] |
Wed, 08 March 2017 08:52 |
cookiemonster
Messages: 13925 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
You've got more than one set of related datablocks in the same form?
<<shudders>>
I'm surprised forms allows multiple relationships with the same name, but fair enough. Would have assumed it'd tack a number on the end of the 2nd one to avoid name collision.
|
|
|
|
|