reset validate_from_list property to its design time value [message #413477] |
Thu, 16 July 2009 00:01 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
salman2k960
Messages: 12 Registered: September 2005
|
Junior Member |
|
|
Scenario:
A text Item named "abc" has lov "xyz" attached. furthermore,validate_from_list property of "abc" is "no" at design time. lets say while execution of the form, following code changes the property:
set_item_property("abc",validate_from_list,property_true);
NOW, what i want to do is to reset this property to its design time value. reading the oracle form documentation which says
"If you want to reset the value of the property to be the value originally established for it at design time, enter two single quotes with no space between: ''. For example, SET_ITEM_PROPERTY('DEPTNO', FORMAT_MASK, ''); would reset that format mask to its design-time value. "
BUT, following statement is not working:
set_item_property("abc",validate_from_list,'');
the result of GET_ITEM_PROPERTY("abc",validate_from_list) is still "TRUE" where it should have been "FALSE".
is it a bug or am i really missing some other settings?
Regards
|
|
|
|
Re: reset validate_from_list property to its design time value [message #414425 is a reply to message #413477] |
Wed, 22 July 2009 02:08 ![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) |
![](/forum/images/custom_avatars/67467.jpg) |
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
In Forms 10g I defined 'Validate from List' for 'dummy' as 'true' and then ran this code in a 'When-Button-Pressed' trigger:
declare
l_var varchar2(100);
begin
l_var := get_item_property('dummy',validate_from_list);
message('l_var=>'||l_var||'<');
pause;
set_item_property('dummy',validate_from_list,property_false);
l_var := get_item_property('dummy',validate_from_list);
message('l_var=>'||l_var||'<');
pause;
set_item_property('dummy',validate_from_list,'');
l_var := get_item_property('dummy',validate_from_list);
message('l_var=>'||l_var||'<');
pause;
end;
The messages I received were 'TRUE', 'FALSE', and then 'TRUE'.
David
|
|
|
|
|
Re: reset validate_from_list property to its design time value [message #414888 is a reply to message #414873] |
Thu, 23 July 2009 23:34 ![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) |
salman2k960
Messages: 12 Registered: September 2005
|
Junior Member |
|
|
David:
When i run your code, it runs fine.
But the difference is in the start. Just try your code again but with "Validate_from_list" property to "False" initially rather than "True".
Even your code will give wrong results. Results will be :-
'FALSE', 'FALSE','TRUE'
whereas it should have been :-
'FALSE', 'FALSE','FALSE'
Regards
|
|
|
|