Validate_from_list [message #393444] |
Sun, 22 March 2009 21:31 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
dynz18
Messages: 5 Registered: May 2008
|
Junior Member |
|
|
hELLOW to all,
i have an item with a trigger Key-Next-Item and below is the code i've written.
the problem is, it does'nt show the LOV and it only clears the item.
can someone tell me why..,
thanks..., whoever reply in this..,
BEGIN
SET_ITEM_PROPERTY('BLKINQ.TB_CONTRACTNO', LOV_NAME, 'LOVCONTNEW');
SET_ITEM_PROPERTY('BLKINQ.TB_CONTRACTNO',VALIDATE_FROM_LIST, PROPERTY_TRUE);
END;
|
|
|
Re: Validate_from_list [message #393474 is a reply to message #393444] |
Mon, 23 March 2009 00:28 ![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) |
|
make sure the LOV name is correct
Key-nxt-item trigger should be in some previous text item than the one in which you want to display LOV
better apply this code at when-validate-item trigger of previous item
|
|
|
Re: Validate_from_list [message #393540 is a reply to message #393444] |
Mon, 23 March 2009 05:14 ![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) |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
BEGIN
SET_ITEM_PROPERTY('BLKINQ.TB_CONTRACTNO', LOV_NAME, 'LOVCONTNEW');
SET_ITEM_PROPERTY('BLKINQ.TB_CONTRACTNO',VALIDATE_FROM_LIST, PROPERTY_TRUE);
END;
If that's all the code you've written then you shouldn't write it at all.
Either you're missing an IF statement - you want to set the lovname dependent the value of another item - in which case stick it in the WHEN-VALIDATE_ITEM trigger of that other item as itech suggested.
OR the code is pointless and those values should be set in the property palette.
As a general rule you should only use KET-NEXT-ITEM triggers for navigation and only if you need to do something unusual.
|
|
|
Re: Validate_from_list [message #393636 is a reply to message #393444] |
Mon, 23 March 2009 20:38 ![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) |
dynz18
Messages: 5 Registered: May 2008
|
Junior Member |
|
|
thank you "itech", and "cookiemaster". for your reply to my code., i will consider your advice.,
i've already found the solution to fire the property LOV_NAME and VALIDATE_FROM_LIST.
BEGIN
SET_ITEM_PROPERTY('BLKINQ.TB_CONTRACTNO', LOV_NAME, 'LOVNEWCONT');
SET_ITEM_PROPERTY('BLKINQ.TB_CONTRACTNO',VALIDATE_FROM_LIST, PROPERTY_TRUE);
GO_ITEM('CMDPRINT');
END;
i just put a GO_ITEM() function to fires the property VALIDATE_FROM_LIST...,
|
|
|
Re: Validate_from_list [message #393707 is a reply to message #393444] |
Tue, 24 March 2009 02:24 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
|
well the use of
key-next-item
and
go_item
is not recommended if you have some alternate ways to achieve the same thing.
better re-write the code in when validate item trigger if you want to change the LOV at runtime
|
|
|