Home » Developer & Programmer » Forms » Get List of Visual Attribute NAMES on a Form (Forms 11g)
Get List of Visual Attribute NAMES on a Form [message #658694] Fri, 23 December 2016 05:07 Go to next message
giorkos_s
Messages: 15
Registered: December 2016
Junior Member
Hi Everyone,

My name is George, just registered here and this is my first post. (although i have used the forum to research other issues I previously had about Forms).

I have searched the forum and the net in general but I did not find any answers about this issue:

What I would like to do is to get the NAMES of all the visual attributes that exist on a Form. ie. If I have a form with 3 VAs, names:
-RED
-GREEN
-BLUE

then I want to be able to read these names ('RED','GREEN','BLUE') in some variables.

The closest i have come to is to use the function Find_Va(vis_attr_name) , but this did not help at all.
So , anyone has any thoughts about how to get the names of the visual attributes on a form please ?

Thank you and Happy Christmas to all of you !

George
Re: Get List of Visual Attribute NAMES on a Form [message #658696 is a reply to message #658694] Fri, 23 December 2016 05:22 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
It's entirely possible you can't. After all, you as the developer should know what the names are already.
Re: Get List of Visual Attribute NAMES on a Form [message #658837 is a reply to message #658696] Wed, 28 December 2016 05:00 Go to previous messageGo to next message
giorkos_s
Messages: 15
Registered: December 2016
Junior Member
Hi Cookiemonster !

Thanks for the reply. SO i guess that there is NO WAY to get the visual attribute Name list from forms.

I know that me as a developer can see what names of visual attributes exist.

My aim was to give some "power" users the ability to change background colours of various bits of information on a form, as they decide, in accordance with their business needs. So when normal users enter those particular forms, each field would have a coloured background to give visual indication to the users of critical info changes (perhaps red) etc.

So in effect i wanted to be able to write a simple procedure to populate a list (actually as many lists as the fields the "power" users require to "colour" themselves, which could be plenty.) !!!!
Anyhow, I will make use of database tables to "store" the VA names and have my lists populating-setting VAs from the table !!! i will just have to remember to populate the VA table myself Smile

Thanks !
George
Re: Get List of Visual Attribute NAMES on a Form [message #658845 is a reply to message #658837] Wed, 28 December 2016 08:03 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
I still don't get it. What is a power user vs. a normal user?
If you give the ability for a user to change the color, that is not saved with the row. Next time you come into the form, it is back to the way it was. Form attributes are not saved with row data.
Re: Get List of Visual Attribute NAMES on a Form [message #658849 is a reply to message #658694] Wed, 28 December 2016 08:32 Go to previous message
giorkos_s
Messages: 15
Registered: December 2016
Junior Member
Hi Joy,

you are right , power users and normal users do not exist in everyday life.
they are just "sample" classifications or Roles in the system...there are more roles, but i just wanted to give a generic example.

And yes, once again you are right, the info of VA is not saved with the row.

I have just finished my "initial" test screen that the "power users" (or whatever you wish to call them, perhaps "Customer Client Manager" Smile have the ability to chose a colour (based on a visual attribute).

of course for the whole thing to work as i wanted it, i needed to create 2 tables.
table 1: H_VA_NAMES - in this table I (the developer) have to enter the values. these are used for the dynamic populating of the lists for the users to select the colour for each field etc.
CREATE TABLE "MY_SCHEMA"."H_VA_NAMES" 
   (	"VA_FORM_NAME" VARCHAR2(30 BYTE), 
	"VA_LIST_NAME" VARCHAR2(30 BYTE)
   )


and table 2: VA_ASSIGNMENT - a table where a trigger (WHEN-LIST-CHANGED) will INSERT or UPDATE the corresponding info for each FORM-BLOCK-FIELD-COLOUR to be read on WHEN-NEW-FORM-INSTANCE and set the visual attributes for each field (using cursor to read for each form)....

 CREATE TABLE "MY_SCHEMA"."VA_ASSIGNMENT" 
   (	"FORM_NAME" VARCHAR2(30 BYTE), 
	"BLOCK_NAME" VARCHAR2(30 BYTE), 
	"FIELD_NAME" VARCHAR2(30 BYTE), 
	"VA_NAME" VARCHAR2(30 BYTE)
 )


Anyhow,
i hope i make things a bit clearer now...sorry i didnt go into details before...just wanted to ask if there was a way to read the NAMES of the VAs without boring you guys with the details !!!

Thanks,

George
Previous Topic: Need trigger
Next Topic: help menu
Goto Forum:
  


Current Time: Thu Mar 28 08:08:48 CDT 2024