Home » Developer & Programmer » Forms » SET_ITEM_INSTANCE_PROPERTY (Forms 6i)
SET_ITEM_INSTANCE_PROPERTY [message #657798] Wed, 23 November 2016 05:00 Go to next message
chat2raj.s
Messages: 161
Registered: October 2010
Location: Chennai, India
Senior Member
I have a item in a control block, whose INSERT_ALLOWED and UPDATE_ALLOWED property are YES both item and block level. When i populate the block initially i set the INSERT/UPDATE allowed as False programatically. Later when user is entering into a new record and if the field is null, then i use SET_ITEM_INSTANCE_PROPERTY to enable INSERT/UPDATE allowed, but it seems not working. Instead when i use SET_ITEM_PROPERTY then all the records in that block becomes insert/update TRUE which i dont want.

Why SET_ITEM_INSTANCE_PROPERTY dosen't work in this case ?
Re: SET_ITEM_INSTANCE_PROPERTY [message #657801 is a reply to message #657798] Wed, 23 November 2016 05:19 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
You haven't given us enough information about the process/code to guess.

Have you tried using get_item_instance_property after the set_item_instance_property call to check what the property is set to?
Re: SET_ITEM_INSTANCE_PROPERTY [message #657803 is a reply to message #657801] Wed, 23 November 2016 05:30 Go to previous messageGo to next message
chat2raj.s
Messages: 161
Registered: October 2010
Location: Chennai, India
Senior Member
Quote:

SET_ITEM_INSTANCE_PROPERTY('JC_IN_OUT', TO_NUMBER(:SYSTEM.CURSOR_RECORD), INSERT_ALLOWED, PROPERTY_TRUE);
SET_ITEM_INSTANCE_PROPERTY('JC_IN_OUT', TO_NUMBER(:SYSTEM.CURSOR_RECORD), UPDATE_ALLOWED, PROPERTY_TRUE);
Initially i tried using CURRENT_RECORD and later :SYSTEM.CURSOR_RECORD, both fails. Yes i tried to use GET_ITEM_INSTANCE_PROPERTY and found it is TRUE only.
Re: SET_ITEM_INSTANCE_PROPERTY [message #657804 is a reply to message #657803] Wed, 23 November 2016 05:41 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
get_item_instance_property doesn't lie. So why do you think it's not working if the property is being set to true?
Re: SET_ITEM_INSTANCE_PROPERTY [message #657806 is a reply to message #657804] Wed, 23 November 2016 06:12 Go to previous message
chat2raj.s
Messages: 161
Registered: October 2010
Location: Chennai, India
Senior Member
Not very sure. I remember using it correctly before sometimes, but this time it is not working out. I have checked through all codes and no where else i have modified this property.

But currently managed to use SET_ITEM_PROPERTY along with one another condition to make sure it remains TRUE/FALSE as expected.
Previous Topic: COPY function not passing variable to datablock
Next Topic: How to execute Linux file from oracle forms
Goto Forum:
  


Current Time: Fri Mar 29 10:19:50 CDT 2024