Home » Developer & Programmer » Forms » how to get visual attribute name into a varible? (6i)
icon7.gif  how to get visual attribute name into a varible? [message #545752] Fri, 02 March 2012 04:31 Go to next message
kartheek
Messages: 17
Registered: February 2012
Location: chennai
Junior Member
Hi all

how to get visual attribute name into a variable ??

I have used the below code....

s_v:=get_item_property('slot1',visual_attribute);

but i am unable to get the name of the visual_attribute..

can anyone please help me out???
Re: how to get visual attribute name into a varible? [message #545753 is a reply to message #545752] Fri, 02 March 2012 04:39 Go to previous messageGo to next message
cookiemonster
Messages: 13925
Registered: September 2008
Location: Rainy Manchester
Senior Member
That code should do what you want. What is it returning?
It might help if you put the block name in front of the item name.
Re: how to get visual attribute name into a varible? [message #545754 is a reply to message #545753] Fri, 02 March 2012 05:21 Go to previous messageGo to next message
kartheek
Messages: 17
Registered: February 2012
Location: chennai
Junior Member
It is displaying as 'custom'....but the name of the visual attribute is green
Re: how to get visual attribute name into a varible? [message #545758 is a reply to message #545754] Fri, 02 March 2012 05:38 Go to previous messageGo to next message
mughals_king
Messages: 392
Registered: January 2012
Location: pakistan
Senior Member
mr kartheek your solution


create visual attribute with the of name "abc" with color green

call it in variable like

key-next-item

set_item_property('block3.b',visual_attribute,'abc');
next_item;

for u here fmb file check it out

Re: how to get visual attribute name into a varible? [message #545759 is a reply to message #545758] Fri, 02 March 2012 05:53 Go to previous messageGo to next message
mughals_king
Messages: 392
Registered: January 2012
Location: pakistan
Senior Member
if your are using form10g do the same thing



Thanks

Re: how to get visual attribute name into a varible? [message #545762 is a reply to message #545759] Fri, 02 March 2012 06:01 Go to previous messageGo to next message
kartheek
Messages: 17
Registered: February 2012
Location: chennai
Junior Member
@mughals king

Thanks for your reply...my intention is to get the visual attribute name into a variable....
like if the visual attribute name is abc (with colour green ) in your application...I want 'abc' to be assigned into a variable..for that
I have written a code like
s_v:=get_item_property(':block3.slot1',visual_attribute);
where slot1 is the item name
if i exceute the above query ...the value 'custom' is stored in the s_v variable..
the problem is I have two more visual attributes with the other colours..so depending upon the visual attribute name i would like to insert those values into the database..
can you help in that scenario please...?

Re: how to get visual attribute name into a varible? [message #545770 is a reply to message #545762] Fri, 02 March 2012 06:22 Go to previous messageGo to next message
kartheek
Messages: 17
Registered: February 2012
Location: chennai
Junior Member
I have also tried this property of visual attribute..
current_record_attribute.....
but still it is dispalying the same thing...'custom'
guess we cant extract the original name of a visual attribute...((((:-
Re: how to get visual attribute name into a varible? [message #545771 is a reply to message #545770] Fri, 02 March 2012 07:09 Go to previous messageGo to next message
mughals_king
Messages: 392
Registered: January 2012
Location: pakistan
Senior Member
yes did u tried in this way


blockname.s_v:=get_item_property('slot1',visual_attribute);
Re: how to get visual attribute name into a varible? [message #545772 is a reply to message #545771] Fri, 02 March 2012 07:13 Go to previous messageGo to next message
cookiemonster
Messages: 13925
Registered: September 2008
Location: Rainy Manchester
Senior Member
Have you read the form builder help topic on the visual attribute property?
It describes the circumstances in which a value of CUSTOM is returned.
Re: how to get visual attribute name into a varible? [message #545773 is a reply to message #545772] Fri, 02 March 2012 07:21 Go to previous message
kartheek
Messages: 17
Registered: February 2012
Location: chennai
Junior Member
Hi all ....

I have been used the same procedure...s_v:=get_item_property(':block3.slot1',visual_attribute);
by using a data block wizard....now I am getting the name of the visual attribute...)):-

hope we cant get the name of the visual attribute if we are creating manually .......(I mean with out using data block wizard)
Thanks to you both for giving suggetions....
Previous Topic: How to relate two list boxes???
Next Topic: viewing records from a tree issue
Goto Forum:
  


Current Time: Fri Jul 05 22:52:13 CDT 2024