Using the following code, I'm trying to set the property of INITIAL_VALUE
in the form field named STATUS
depending on the condition. The following code is on PRE-TEXT-ITEM
trigger.
BEGIN IF (:LOAN.STATUS = 'A') THEN SET_ITEM_PROPERTY(:LOAN.STATUS,INITIAL_VALUE,'Active'); ELSIF (:LOAN.STATUS = 'I') THEN SET_ITEM_PROPERTY(:LOAN.STATUS,INITIAL_VALUE,'Inactive'); END IF; END;
Putting the following code outside of the condition doesn't work as well.
SET_ITEM_PROPERTY(:LOAN.STATUS,INITIAL_VALUE,'Active');
Please advise what I'm doing wrong.
When referring Forms' help, seen that there's no such property
(second argument) INITIAL_VALUE
for SET_ITEM_PROPERTY
method. Instead, you might assign the desired value for the item directly in PRE-TEXT-ITEM
trigger as below :
BEGIN IF (:LOAN.STATUS = 'A') THEN :LOAN.STATUS := 'Active'; ELSIF (:LOAN.STATUS = 'I') THEN :LOAN.STATUS := 'Inactive'; END IF; END;
or abbreviately fill the trigger with the following code instead of the above :
select decode(:LOAN.STATUS,'A','Active','I','Inactive') into :LOAN.STATUS from dual;
3You can also put a value like below in the INITIAL VALUE property.
:OTHER_BLOCK.OTHER_ITEM
and by doing this, that item referenced in the INITIAL VALUE property is now like a variable.
ncG1vNJzZmirpJawrLvVnqmfpJ%2Bse6S7zGiorp2jqbawutJobGttYG59d3yOrJytZZmpsq55z6umqZ2iqcZuu81moKehpJ6urXnVmqOunV2jvLV51qippKGenA%3D%3D