Home » Developer & Programmer » Forms » COMMENT BUTTON Set_ICO_Property (Oracle10g, Forms, XP)
COMMENT BUTTON Set_ICO_Property [message #553358] Thu, 03 May 2012 14:50 Go to next message
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 #553367 is a reply to message #553358] Thu, 03 May 2012 21:37 Go to previous messageGo to next message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Try with SET_ITEM_INSTANCE_PROPERTY instead.
Re: COMMENT BUTTON Set_ICO_Property [message #556179 is a reply to message #553367] Thu, 31 May 2012 13:27 Go to previous messageGo to next message
nik.gujeran
Messages: 11
Registered: July 2011
Junior Member
Hello Littlefoot,

sorry for a very delayed reply.. First of all, thank you so much for your suggestion.

I tried, set_item-instance_property but it is not working.. I have 14 columns of Comment buttons of 10 items each column. Currently when i write a comment on one row, all the comment buttons for that column change the icon to available.. Please advise if there is any way that i can make it work..

Once again, highly appreciate your help
thanks,
NG
Re: COMMENT BUTTON Set_ICO_Property [message #556187 is a reply to message #556179] Thu, 31 May 2012 15:14 Go to previous message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I opened Forms Help and searched for ICON_NAME property you used. It says:
Oracle
The 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.
Previous Topic: How to capture a return value from LOV at run time
Next Topic: Passing info. thru forms
Goto Forum:
  


Current Time: Fri Jul 05 22:05:41 CDT 2024