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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mouse-doubleclick - Entering or querying data

Status
Not open for further replies.

bilalch

Programmer
Sep 26, 2003
84
0
0
IR

hi dear frends,

i've two blocks named STYLES and SDETAILS both in the different canvases. where STYLES is a master block and
SDETAILS is detailed block.
now i want while entering the data or querying block
that on double clicking the STYLE_NO from styles the form
should move to the SDETAILS block to show the relative information in the SDETAILS block.
or
to enter the data relative to the clicked STYLE_NO.

i've written this code in the When-mouse-doubleclick trigger for the :STYLES.STYLE_NO

declare
a varchar2(20);
begin
a := :STYLES.STYLE_NO;
go_block('SDETAILS');
enter_query;
:SDETAILS.STYLE_NO := a; //copy STYLE_NO from STYLES to
// SDETAILS block.
execute_query;
end;

i think it will work only for querying the block if it does. so plz suggest some other solution or refine it this way both for querying and entering data.
 
Can you explain why you code master-detail relantionship manually? When you create relationship you get a couple of things "for free": parent key values are copied to child key fields through COPY FROM property and child block is populated automatically. So IMO the only thing you need is to navigate to child block.
Once more, don't invent your own wheel. Forms provides a lot of capabilities, just learn them. Look at demos sources. Read Cue Cards at least:)

Regards, Dima
 
hi dear dima.

in all u r rite.
but there are some other things we don't know abt and we want them, then y not to try. as for cue cards , i've read these all but couldn't find demos etc any where plz tell me if u can find some site for the demos & built ins.

my detailed block has a no of items which may take more
space on the canvas so i want it at some seperate canvas
and hav the facility to move on to that canvas on mouse click.

thanx
bye

 
no dear ,problem is that it goes to that block, but the query doesn't show any results.

perhaps the fault is somewhere in executing query after copying the value into the item.

 
hi dear dima.

i've to manually execute the query afterwards.
means the query doesn't get executed.

and also after i manually execute the query the forms ask for saving the values.

regards.
 
Check DEFERRED_COORDINATION and AUTOQUERY relation properties.
You're asked for saving records because of :SDETAILS.STYLE_NO := a;: this actually invalidates SDETAILS block. I've suggested you to get rid of all those commands except GO_ITEM. As you don't follow my advices I think it ther's no reason to continue giving them. Sorry.

Regards, Dima
 
sorry dear,

i think i didn't mention it that i've tried this suggestion too. but same results occured.

i think if i'm trying to find some solution ,there's no reason for me to not try the suggested solutions.

ur suggestions are really precious for me as i've solved my problem timely by using just the single record block in the detailed block and manually executing the sql select statement on the mouse-doubleclick trigger. still i need the solution for the multi record block as this solution won't solve my problem in case of multi record block.

* and what r these DEFERRED_COORDINATION and AUTOQUERY
and where to look for these.

thanx & regards.
bye
 
As Dima has said, they are properties on a relationship created between two blocks. Create a relationship in your form then open the property palette for the relation.
 

hi frends,

both of these properties i.e. Deffered & Auto Query are set to 'NO' (default-I didn't change).

is it necessary to create relation even, when doing the job manually.

thanx
bye
 
It's not necessary, but the reality is that YOU don't know how to do it manually. So don't expect an aid in developing ERP systems in Assembler, choose another tool. Don't code everything manually just because you don't know how this can be done automatically. Manual coding should be done by experienced developer, who is not satisfied with default behaviour. As I see you know nothing about default features, so learn this first.

Regards, Dima
 
ok dear Dima.

u'v tried a lot to help me.
i'm really thankfull to you as well to lewisp.

thanks again
bye.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top