Home » Developer & Programmer » Forms » How to remove status changed from DataBlock (10.1.2.0.2)
How to remove status changed from DataBlock [message #619409] Tue, 22 July 2014 05:16 Go to next message
alex_shynk
Messages: 20
Registered: July 2014
Junior Member
I chose record in DataBlock use LOVs. But it change DataBlock's status to inserted.
When form closing I get next message 'Do You want to save the changes you made?'

How to change status to unchanged for one DataBlock from multi DataBlocks?

I have tried next decision
trigger PRE-INSERT:
FORMS_DDL('SAVEPOINT B');

trigger POST-INSERT:
FORMS_DDL('ROLLBACK TO B');

But not successful and i do not know why.

[Updated on: Tue, 22 July 2014 05:16]

Report message to a moderator

Re: How to remove status changed from DataBlock [message #619413 is a reply to message #619409] Tue, 22 July 2014 05:40 Go to previous messageGo to next message
cookiemonster
Messages: 11088
Registered: September 2008
Location: Rainy Manchester
Senior Member
I'm not sure why you thought savepoint and rollback would be useful here.
The correct solution generally is to ensure the status doesn't go wrong in the first place.

In standard forms processing you would go into enter-query mode, pick a value from the list and then use execute-query.
Alternatively you would have a non-database control block in which you enter the query criteria and use that to set a where clause on a database block, then you use execute-query.
With either approach you shouldn't end up in this situation.

So what exactly are you doing that causes the datablock to go to insert status?
Re: How to remove status changed from DataBlock [message #619446 is a reply to message #619413] Tue, 22 July 2014 09:32 Go to previous message
alex_shynk
Messages: 20
Registered: July 2014
Junior Member
cookiemonster wrote on Tue, 22 July 2014 05:40
I'm not sure why you thought savepoint and rollback would be useful here.
The correct solution generally is to ensure the status doesn't go wrong in the first place.

In standard forms processing you would go into enter-query mode, pick a value from the list and then use execute-query.
Alternatively you would have a non-database control block in which you enter the query criteria and use that to set a where clause on a database block, then you use execute-query.
With either approach you shouldn't end up in this situation.

So what exactly are you doing that causes the datablock to go to insert status?

I set "DataBase Data Block: NO" for DataBlock and it solved my problem. Thank You.

[Updated on: Tue, 22 July 2014 09:32]

Report message to a moderator

Previous Topic: insert a record into database upon pressing a Button
Next Topic: How to definne? - it is first or second start of the trigger "WHEN-VALIDATE-ITEM"
Goto Forum:
  


Current Time: Thu Oct 30 23:56:57 CDT 2014

Total time taken to generate the page: 0.13637 seconds