Home » Developer & Programmer » Forms » Forms go_block doesn't seem to work (Forms 6i)
Forms go_block doesn't seem to work [message #583988] Tue, 07 May 2013 12:48 Go to next message
sgoopy
Messages: 2
Registered: May 2013
Junior Member
Hello All

I have a master block (MASTER with Item 1 and 2) and details block (DETAILS). If the user enters the query mode and queries the Master block, the Details get populated automatically. So far so good.

Now I attached an LOV to Item 1 in the Master Block and the requirement is that when the user picks an item in the LOV, the details should automatically populate. Because of "restricted procedures" (GO_BLOCK) in triggers, I put a Button in a Control Data Block and the code in the WHEN-BUTTON-PRESSED trigger is as follows :

GO_BLOCK('DETAILS');
EXECUTE_QUERY;

It does go to the Details block and also displays all the details. However, when I try to update, insert or delete data, it fails with "Insufficient Privileges". So when I looked at the query being executed (Cntrl + Shift + E), I can see that it is trying to perform these operations on the Master block. (ie for some reason the scope is still in the Master and not Details even after Go_Block(DETAILS) has been executed.

I then tried to use Go_Item('DETAILS.Dept_No') to see if that would help. That too did not work. I tried to set the Navigation Style on these Data Blocks to "Change Data Block". Still no success.

Any clues will be greatly appreciated.

Thanks,
Sue
Re: Forms go_block doesn't seem to work [message #584002 is a reply to message #583988] Tue, 07 May 2013 15:25 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
you can't change data block while in enter-query mode.
Re: Forms go_block doesn't seem to work [message #584003 is a reply to message #584002] Tue, 07 May 2013 15:59 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Try to switch these commands, i.e.
execute_query;
go_block('details');
Re: Forms go_block doesn't seem to work [message #584104 is a reply to message #584003] Wed, 08 May 2013 13:23 Go to previous message
sgoopy
Messages: 2
Registered: May 2013
Junior Member
Thanks for the suggestions.

I did figure out what was the issue. When I tried to Save the data in the form, it was attempting to update both the Master and Details. I really wanted only the Details to be saved. So I turned off the "Insert Allowed", "Update Allowed" and "Delete Allowed" on the Master block and it then saves only the Details.

-Suchi
Previous Topic: view based form
Next Topic: software for developer suit 6i
Goto Forum:
  


Current Time: Thu Apr 25 09:42:43 CDT 2024