This content has been marked as final. Show 16 replies
go_block('to_sanct');When you press the button it's send the focus to to_sanct block. Check this is it your problem ?
navigation moves from the current canvas to another canvas.Is this from your above code ?
If not need more information or you can write code to back to previous block.
Hope this helps
Few assumption... check this...
1. If the button is the last item of the block and the block behaviour set to Change Data Block.. this can happen.
2.Make all the code in the button as comment by /*-----*/ then write
Press the button and see what happen ?
If then it's change the block means canvas we have to look for others.. if not check your code..
Hope this helps
Edited by: HamidHelal on May 5, 2012 1:25 PM
Sorry for such a late reply Hamid.I have tried commenting all code and putting the button only with
In such case navigation doesn't occur.then again i tried commenting each set code and i suspect that navigation occurs only in the presence of "COMMIT" statement.
Does this COMMIT statement have any impact on the navigation?.Do u have any idea Hamid.
declare g char(1); begin -- message('value is '||:gd_ind); /* if :gd_ind is not null then if :gd_ind = 'Y' then G:='Y'; ELSE G:='N'; end if; -- MESSAGE('IN'); -- MESSAGE('TRANS ID'||:c_trans); -- MESSAGE('head '||:c_head); --MESSAGE('gd value '||G); Leave_application.grant_or_deny_leave(:c_trans,:c_head,G);*/ COMMIT; /* -- MESSAGE('OUT'); -- MESSAGE('TRANS ID'||:c_trans); -- MESSAGE('head '||:c_head); -- MESSAGE('gd value '||G); --end if;*/ end;
Does this COMMIT statement have any impact on the navigation?.Do u have any idea Hamid.Not at all...
Pls check the order of blocks in ur Object Navigator it might be changed by mistack...
Rearrange it the way they appear in the Layout
If this doesn't work pls check the the order of the Stacked canvases pls use
Go_bock();in Displaying and hiding the stacked canvases u r navigating through...
Pls note the item must be navigable and visible in canvas layout...
One last try pls look for the BUILT-IN
GO_BLOCK('block _problem');select Edit menu form design time > select Find > Then write name of the block causing the problem
and > Search
It must Reside in ur Package during navigating between canvas by mistake...
Or u have a KEY-COMMIT or any related form level commit triggers regarding the navigating after commit.
Hope this helps...
Edited by: Amatu Allah on May 7, 2012 12:24 AM
So, it's clear to you that, COMMIT/COMMIT_FORM in the button caused the problem. right ?
Now, need investigation ,
Do you have any trigger named key-commit or on-commit or post-query ?
If yes.. check the code that any code move the cursor to the navigated block.
And change the property of the button , Keyboard Navigation to NO.
and the block behaviour is also not 'change datablock' but 'same record'.@Dear Amatu
Pls check the order of blocks in ur Object Navigator it might be changed by mistack...As navigation property is 'same record' the order of blocks is not the problem.
Hope this helps
Asalamu Alikum Ya Hamid
Yes u r right but if u look at the time between her explanation and my assumbtion u will find out the answer by urself :)
Thanks & Happy for ur science honesty & interest :)
i recommand u Vidusnat to Recompile & Regenerate ur forms then Save & Run to make changes take place...
u should also make sure that the creation of the button actually existed in the same datablock which is supposed to be ; u may create it in design time on the layout but it is created in the object navigator in another block so pls check the object navigator
Edited by: Amatu Allah on May 7, 2012 1:15 AM
Hi Amatu & Hamid,
I have no KEY-COMMIT trigger.I used only commit_form in my code.and I checked all the possibilities mentioned by u both.but couldn't find out the actual reason for the navigation at the time of commit.so i deleted the block and the canvas and recreated it newly and tested it.Glad!..now its working fine without navigating to other canvases.Thanku so much for ur timely suggestions.