Home » Developer & Programmer » Forms » Problem in Create_Record
Problem in Create_Record [message #168204] Wed, 19 April 2006 05:00 Go to next message
emadbsb
Messages: 334
Registered: May 2005
Location: egypt
Senior Member

Sorry my several questions

i made a menu and this menu contain several button
one of its buttons is insert

i made no allow to insert in the property pallete of the block
this property is changed when i press "insert" button from the menu


my code when i press the insert button is :

Quote:



if (vMenuItem = 'INSERT_RECORD') then
SET_BLOCK_PROPERTY (:SYSTEM.CURRENT_BLOCK,INSERT_ALLOWED,PROPERTY_TRUE);
do_key(CREATE_RECORD);

SET_BLOCK_PROPERTY (:SYSTEM.CURRENT_BLOCK,INSERT_ALLOWED,PROPERTY_FALSE);





but it change the property to false before i enter my insertion
i want to insert and then set the property to false


thanks for everyone helped and helping me
Re: Problem in Create_Record [message #168217 is a reply to message #168204] Wed, 19 April 2006 05:46 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
What is the point? You would have a new empty record and you would not be able to place any information into the fields as the block has been marked 'false' for insert?

Is this an assignment or are you just 'thinking' of things to do? If you have a requirement share it with us and we will help you design a 'normal' system to handle it.

David
Re: Problem in Create_Record [message #168220 is a reply to message #168204] Wed, 19 April 2006 05:55 Go to previous messageGo to next message
emadbsb
Messages: 334
Registered: May 2005
Location: egypt
Senior Member

all i want to do is:

1. set the block property for insertion to true
2. availabilty to insert record
3. set the block property for insertion to false



Re: Problem in Create_Record [message #168266 is a reply to message #168220] Wed, 19 April 2006 09:10 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Why? Is this an assignment or a business requirement? What is your written request? Why must the insertion be turned off BEFORE the data is entered into the record, why not turn insertion off after?

David
Re: Problem in Create_Record [message #168272 is a reply to message #168204] Wed, 19 April 2006 09:21 Go to previous messageGo to next message
emadbsb
Messages: 334
Registered: May 2005
Location: egypt
Senior Member

i need this in my work and at the same time i want to know how to do it?
coz i am working as oracle developer but i still junior


and i don't want to turn it off before insertion
i want to turn it of after insertion
and that's what i hope to do

[Updated on: Wed, 19 April 2006 09:24]

Report message to a moderator

Re: Problem in Create_Record [message #168278 is a reply to message #168272] Wed, 19 April 2006 09:33 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
If you want to turn it off AFTER insertion then put the 'off' code into a trigger that fires after the record has been processed. I don't have the reference manual on this PC so you will have to check it yourself to see if the set_block_property is legal in the post-insert and post-update triggers. Put your code in there if it is legal, otherwise do it in another trigger.

By the way, I don't believe that user specifications have copyright so you are probably allowed to key into a forum entry the requirement that you have been given. Remember, YOU ARE A FORMS DEVELOPER, the user tells you to write a form that has certain functionality, it is NOT their position to tell you HOW to code it. As I have told many Business Analysts "Give me the egg, but don't tell me how to suck it!". It is their job to describe what the form has to do but it is your job, not their's, to use the tool (Oracle Forms) to deliver that functionality.

David
Re: Problem in Create_Record [message #168282 is a reply to message #168204] Wed, 19 April 2006 09:49 Go to previous messageGo to next message
emadbsb
Messages: 334
Registered: May 2005
Location: egypt
Senior Member

for :
Quote:


By the way, I don't believe that user specifications have copyright so you are probably allowed to key into a forum entry the requirement that you have been given. Remember, YOU ARE A FORMS DEVELOPER, the user tells you to write a form that has certain functionality, it is NOT their position to tell you HOW to code it. As I have told many Business Analysts "Give me the egg, but don't tell me how to suck it!". It is their job to describe what the form has to do but it is your job, not their's, to use the tool (Oracle Forms) to deliver that functionality.




my boss told me that he want to have his form must be in a query mode after each operation (insert,delete,update)
he want this according to item pressed in the menu
that is all what he want


and for:

Quote:


If you want to turn it off AFTER insertion then put the 'off' code into a trigger that fires after the record has been processed. I don't have the reference manual on this PC so you will have to check it yourself to see if the set_block_property is legal in the post-insert and post-update triggers. Put your code in there if it is legal, otherwise do it in another trigger.





how can i use trigger in my menu?????????
Re: Problem in Create_Record [message #168373 is a reply to message #168282] Thu, 20 April 2006 02:03 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Quote:

he want this according to item pressed in the menu
Do you really mean menu or do you mean toolbar?

How many rows are you displaying normally?
Quote:

his form must be in a query mode
Do you mean 'enter query' mode or do you want the rows displayed but the data can't be modified?

David
Re: Problem in Create_Record [message #168378 is a reply to message #168204] Thu, 20 April 2006 02:31 Go to previous messageGo to next message
emadbsb
Messages: 334
Registered: May 2005
Location: egypt
Senior Member

hii thanks MR. David for every response


for:
Quote:


Do you really mean menu or do you mean toolbar?


i mean menu



for:
Quote:


How many rows are you displaying normally?


my rows in my screens doesnot have any measurement that's according to the data entry


for:
Quote:


Do you mean 'enter query' mode or do you want the rows displayed but the data can't be modified?


I want the rows displayed but the data can't be modified
that is exactly what i want (cannot insert,cannot delete,cannot update)

[Updated on: Thu, 20 April 2006 02:44]

Report message to a moderator

Re: Problem in Create_Record [message #168384 is a reply to message #168378] Thu, 20 April 2006 02:45 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Quote:

my rows in my screens doesnot have any measurement that's according to the data entry
Nope. When you build your screen you specify how many rows can be displayed. How many are you defining.

How do you 'point' to the row that is going to be deleted?

David
Re: Problem in Create_Record [message #168387 is a reply to message #168204] Thu, 20 April 2006 02:54 Go to previous messageGo to next message
emadbsb
Messages: 334
Registered: May 2005
Location: egypt
Senior Member

by the up and down arrows

the row that i want to delete i move to it and then press delete my menu bar

the code of delete in my menu is :

Quote:


if (vMenuItem = 'DELETE_RECORD') then

SET_BLOCK_PROPERTY (:SYSTEM.CURRENT_BLOCK,DELETE_ALLOWED,PROPERTY_TRUE);
do_key('DELETE_RECORD');
SET_BLOCK_PROPERTY (:SYSTEM.CURRENT_BLOCK,DELETE_ALLOWED,PROPERTY_FALSE);



Re: Problem in Create_Record [message #168388 is a reply to message #168387] Thu, 20 April 2006 03:09 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I think that's about it! Anything else on which you need input?

David
Re: Problem in Create_Record [message #168389 is a reply to message #168204] Thu, 20 April 2006 03:17 Go to previous messageGo to next message
emadbsb
Messages: 334
Registered: May 2005
Location: egypt
Senior Member

we become far from my question
that is my question again

please help me

Quote:


i made a menu and this menu contain several button
one of its buttons is insert

i made no allow to insert in the property pallete of the block
this property is changed when i press "insert" button from the menu


my code when i press the insert button is :

Quote:
if (vMenuItem = 'INSERT_RECORD') then
SET_BLOCK_PROPERTY (:SYSTEM.CURRENT_BLOCK,INSERT_ALLOWED,PROPERTY_TRUE);
do_key(CREATE_RECORD);

SET_BLOCK_PROPERTY (:SYSTEM.CURRENT_BLOCK,INSERT_ALLOWED,PROPERTY_FALSE);


but it change the property to false before i enter my insertion
i want to insert and then set the property to false

Re: Problem in Create_Record [message #168521 is a reply to message #168389] Thu, 20 April 2006 19:49 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
How about this: You turn INSERT off in the Post-Record trigger. However, as Post-Record will fire as you leave the current record, when you do the Create_Record, you set a flag in the menu code which says there is an insert coming. So if the flag is 'set' you 'unset' it so that the NEXT Post-Record trigger will turn INSERT off. You also turn INSERT off in the commit code that you have written.

David
Previous Topic: How to set the font size when using the HOST command from Form?
Next Topic: Unable to Modify an Picture
Goto Forum:
  


Current Time: Fri Sep 20 07:22:05 CDT 2024