Make a field as mandatory at current record level [message #458059] |
Thu, 27 May 2010 02:50 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
dhanasurya
Messages: 33 Registered: May 2010
|
Member |
|
|
Hi All,
I have one requirement i.e i want to make a particular item as mandatory for the current record in the tabular form.
so i have written code as below:
DECLARE
lv_item item;
BEGIN
lv_item := FIND_ITEM ('XXMZ_DETAIL.QTY_ACT');
SET_ITEM_INSTANCE_PROPERTY (lv_item,
current_record,
required,
property_true);
END;
This code is not effecting qty field.
If i write set_item_property built-in that item becomes mandatory.But it's not effecting at current record level.It's effecting block level.
So how can i make a field as mandatory at current record level?
Please give me some idea.
Thanks,
|
|
|
|
|
|
Re: Make a field as mandatory at current record level [message #458068 is a reply to message #458065] |
Thu, 27 May 2010 03:47 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
dhanasurya
Messages: 33 Registered: May 2010
|
Member |
|
|
Hi,
I have written the code in the WHEN-NEW-RECORD-INSTANCE trigger using a condition.
If i use set_item_instance_property it's not working.
If i use set_item_propery it's working and in the else part of if we have to make thet property as FALSE.then it's working.
so now my issue is closed
Thank you all..
Thank you very much...
|
|
|
Re: Make a field as mandatory at current record level [message #458069 is a reply to message #458059] |
Thu, 27 May 2010 03:54 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
gregor
Messages: 86 Registered: March 2010 Location: Germany
|
Member |
|
|
Hi dhanasurya ,
the Item-Property "REQUIRED" only fires, if an item has changed.
You can :
.... MZ_DETAIL.QTY_ACT := 'x'; --( if null before)
SET_ITEM_INSTANCE_PROPERTY (lv_item,current_record,required,property_true); MZ_DETAIL.QTY_ACT := NULL;
or
...
set_item_property(lv_item,IS_VALID,FALSE); SET_ITEM_INSTANCE_PROPERTY (lv_item,current_record,...
GG
|
|
|
|
Re: Make a field as mandatory at current record level [message #458198 is a reply to message #458073] |
Thu, 27 May 2010 17:14 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
gregor
Messages: 86 Registered: March 2010 Location: Germany
|
Member |
|
|
Hi littlefoot,
I assigned a dummy-value i.E.'x' to QTY_ACT, if it is Null,(if "not null" don't make sense), BEFORE! setting Item_instance_property(). It works, the user can NOT leave this item. Seams to been crazy . .. but item-properties are binary and(ed) or or(ed). I don't spend more in this "feature". Because, your code works too (Q: Haven't tested your code; can the user leave the forms-item, after once clicked in?). Because, when an item should be "REQUIRED" the property for the whole column ( in the multi-record) can be set dynamic always again, with "set_item_property", (i.E on When_New-Record/Item-Instance).
GG
|
|
|