Home » Developer & Programmer » Forms » block property (forms 6i, database 11g)
block property [message #676248] Wed, 22 May 2019 23:22 Go to next message
asifcs
Messages: 21
Registered: May 2019
Location: pakistan
Junior Member

Hi everyone,
I am working on forms 6i. I need to disable update property on the basis of a column in which when the date!= sysdate make update property false. please guide me if the issue in my code and moreover tell me in which trigger I should have to use this code I have try it in pre update trigger. Below is my code.
code compiling successfully.

if to_date(:Daily_activity_report.DAR_date) != sysdate
THEN SET_BLOCK_PROPERTY('DAILY_ACTIVITY_REPORT', UPDATE_ALLOWED, PROPERTY_FALSE);
ELSE
SET_BLOCK_PROPERTY('DAILY_ACTIVITY_REPORT', UPDATE_ALLOWED, PROPERTY_TRUE);
END IF;
Re: block property [message #676272 is a reply to message #676248] Fri, 24 May 2019 02:57 Go to previous message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
What datatype is dar_date?

Does dar_date have a time? because sysdate does.
Probably you want to compare to trunc(sysdate) rather than sysdate unless you want to disallow unless dar_date matches the current time to the second.

Pre-update is probably the wrong trigger, I imagine that block property is checked before pre-update fires so you're too late setting it there.

Put the code in when-validate-item on dar_date and post-query.
Previous Topic: count hit in oracle forms 6i.
Next Topic: Empty Word document after MailMerge
Goto Forum:
  


Current Time: Thu Mar 28 12:49:20 CDT 2024