COMMENT BUTTON Set_ICO_Property [message #553358] |
Thu, 03 May 2012 14:50 |
NVG8
Messages: 1 Registered: May 2012 Location: Arizona
|
Junior Member |
|
|
Hello All,
I have a question related to comment button Icon. I am working on a form that has 14 columns of hours and 14 columns of Comments. I wrote a program unit procedure
PROCEDURE SET_ICO_PROPERTY(VfieldName in VARCHAR2) IS
BEGIN
IF VfieldName = 'Block_name.comment_btn' THEN
IF :block_name.comments is not null then
Set_Item_Property( VfieldName,ICON_NAME,'notes');
elsif :block_name.comments is null then
Set_Item_Property(VfieldName,ICON_NAME,'nonotes');
end if;
END IF;
Like this, i have 14 queries for all different comment_btns
then i wrote a trigger on the block level
When-New-Record-Instance "SET_ICO_PROPERTY('Block_name.comment_btn');
Also, wrote When-Validate-Item trigger at the Comments "SET_ICO_PROPERTY('Block_name.comment_btn');
This works fine but I want to make it record specific. Meaning to say, if a particular record is empty and has no comments in the comments section, then the button property should not change.
Right now, if i have one comment, the entire column of 100+rows shows a change in the icon. This is creating some confusion for the user to recognize, which of the button / item, out of the entire column may have real comments in it.
Please advise if you have any better solutions to resolve this issue.
Highly appreciate your help.
NVG
[EDITED by LF: applied [code] tags]
[Updated on: Thu, 31 May 2012 15:00] by Moderator Report message to a moderator
|
|
|
|
|
Re: COMMENT BUTTON Set_ICO_Property [message #556187 is a reply to message #556179] |
Thu, 31 May 2012 15:14 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
I opened Forms Help and searched for ICON_NAME property you used. It says:
OracleThe icon filename should not end in any of the following five letters: A, L, M, S, and X. (Neither upper-case nor lower-case are allowed.) These are reserved letters ...
Both of your icon names end with an "S", so - that might be (part of) your problem. However, even if you rename it, SET_ITEM_PROPERTY will always change ALL items, not by the record.
Moreover, it appears that there's no ICON_NAME property for SET_ITEM_INSTANCE_PROPERTY so my previous suggestion was a blind shot. Obviously, that won't work. You might, though, set its VISUAL_ATTRIBUTE (for example, to "green" if there's a comment there and "red" if there's none).
I wouldn't know any other option, sorry.
|
|
|