SET_ITEM_INSTANCE_PROPERTY [message #657798] |
Wed, 23 November 2016 05:00  |
chat2raj.s
Messages: 163 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   |
cookiemonster
Messages: 13965 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   |
chat2raj.s
Messages: 163 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 #657806 is a reply to message #657804] |
Wed, 23 November 2016 06:12  |
chat2raj.s
Messages: 163 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.
|
|
|