Visual attribute for current item

How can i set the visual attribute of the current item in multi block form so that when user navigate through item in a form its background colour is changed and user can easily trace where the cursor is ?

1- I have three list box on the form as well so whether post-text-item works over therei have no issues with this and it is working fine in my forms list box
2- and i have 3 datablock among which 2nd and thid datablock is multirecord datablock where i set current record visual attribute so what is the behaviour @ run time either current record Visual attribute override current item VA or it works fine
it is working perfectly in multi record also..you need to remember in post text trigger use the same visual attribute used for current record visual attribute

Similar Messages

  • Reg: visual attribute for list item

    hi frs,
    i have created a listitem i have used
    APP_ITEM_PROPERTY2.SET_PROPERTY('list4',VISUAL_ATTRIBUTE, 'color');
    in keylistval Trigger.
    when i select one particular item in the list it should have background color mentioned in the VISUAL_ATTRIBUTE 'color'.
    but what is happening is when i select one particular item visual attribute is set to all items in list.
    why it is so?
    how can i solve this problem.
    any one help pls.
    Thanks
    Rajesh

    1- I have three list box on the form as well so whether post-text-item works over therei have no issues with this and it is working fine in my forms list box
    2- and i have 3 datablock among which 2nd and thid datablock is multirecord datablock where i set current record visual attribute so what is the behaviour @ run time either current record Visual attribute override current item VA or it works fine
    it is working perfectly in multi record also..you need to remember in post text trigger use the same visual attribute used for current record visual attribute

  • Visual attribute for records in MULTISELECT block

    Hi,
    For some type of records I need to set background colour yellow.
    The block has property set to QMSSO$MSEL_BLOCK.
    I am using below code for each field in the block displayed:
    POST_QUERY for the block:
    set_item_instance_property('block.column_name',l_cur_rec, visual_attribute, 'QMS$BLACK_ON_YELLOW');
    Also on when-new-record-instance I have added following code for getting the yellow colour on select:
    if upper(:VANN.MESSAGE_NAME) LIKE '%PROB%'
    then
    qms$user_prefs.set_va_selected_record('QMS$BLACK_ON_YELLOW');
    else
    qms$user_prefs.set_va_selected_record('QMS$WHITE_ON_DARKBLUE');
    end if;
    But problem is that when we navigate from record with background Yellow to any other record displayed the visual attribute is change back to Grey (yellow colour disappears).
    This functionality must work for multiselect block. Is there any headstart function/utility which can help me to resolve the problem.

    1- I have three list box on the form as well so whether post-text-item works over therei have no issues with this and it is working fine in my forms list box
    2- and i have 3 datablock among which 2nd and thid datablock is multirecord datablock where i set current record visual attribute so what is the behaviour @ run time either current record Visual attribute override current item VA or it works fine
    it is working perfectly in multi record also..you need to remember in post text trigger use the same visual attribute used for current record visual attribute

  • Partially apply a visual attribute to an item

    Is there any way to partially apply a visual attribute to an item?
    Currently, I do not have commas for my number formats and of course, now it is required. I am limited for space and adding the comma's will cause design layout issues. I was trying to think of another way to accomplish this -- red999,black999,red999,black999.99
    Any other suggesions or work arounds?
    Lesson learned ;)
    TIA

    Sorry if I was not clear. The colors would represent the positions that would be between the commas so the user could identify, lets say, between 1000.00 and 10000.00 or 1000000.00
    I was just wondering if there was a way to do this or if others have had similiar situations and may have other suggestions for a work around without having to go back and adjust my layout.

  • Visual attributes of disabled item. plase help

    I have a form where when i disabled an item, this item item became unreadable, the font has blanc shine and when changing visual attributes property, can not find how to fix it. Do you have any idea? Thank you very much for your help. Thnaks.

    Thanks, i think of this but the items are mainly checkbox and radio button, i need to keep enabled to false.
    But would like to know is it possible to change the default visual displaying of disabled items?
    Edited by: Tabit7 on Jul 18, 2011 9:41 AM

  • Attributes for text items

    Hello,
    i am trying to change the attribute of a text item on a form that displays ten text items at a time...
    i want one type of attribute to be if the text item says "credit o.k." to be a green background and if the text item says "credit bad" to have a red background...
    i can make all of the displayed fields the same attribute but i can't seem to make the individual ones different...
    any suggestions would be great...
    bart

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by JAMIE MCPHIE ([email protected]):
    You can use the set_item_instance_property built-in.
    Jamie<HR></BLOCKQUOTE>
    Use the form builtin DIPLAY_ITEM with your desired visual attribute parameter and text field to change visual settings. You can use this in the item instance level triggers
    If any problem, let me know.
    rgds
    Able
    null

  • Is it possible to have undefined attributes for an item type...see more in the messag

    I want to create an item called 'book' with attributes like title, date of publish, language, pages....and author, but i want that users can assign many authors (as much as users want)....is this possible?? How can I realize it??? Could I create author like a item type too?
    Thanks for all

    You can have any number of multi table mappings in an item descriptor.
    Take a look at the following example
    http://docs.oracle.com/cd/E23507_01/Platform.20073/RepositoryGuide/html/s1204repositoryexampleconetomanywitha01.html
    You can also open any repository in dyn/admin say userProfile.xml in ProfileAdaptorRepository and see the existing one to many (multi table) mappings.
    It just depends on how many multi properties you have in your requirements, create as many multi table relationships.
    ~Gurvinder

  • FRM 41032: cannot set enabled attribute of current item B00.CB_EMAIL

    Hi Folks,
    I am getting the error as shown below in the screenshot. I just changed the background of the form. It was dark in color, so I changed it to brighter colors. There was no change in the code.
    Please could you let me know, what could be the reason for this error? I wish I could send you guys the screenshot.
    Is there any way possible.
    I have also pasted my PLSQL code below. Please help me out in this matter as it is very urgent
    Thanks in advance,
    Vishal
    --------------------------------CODE---------------------------
    PROCEDURE set_user_access IS
    tcnt number;
    rval number;
    BEGIN
    -- get username from application
    :b00.user_login := get_application_property(username);
    -- get access level from segment_user
    select access_level
    into :b00.acc_level
    from segment_user
    where user_login = :b00.user_login;
    -- limit oc access
    -- level 1 & 2 users have access to all OCs
    if :b00.acc_level in ('1','2') then
         :b00.user_oc := 'ALL';
    elsif :b00.acc_level in ('3','4','5','6') then
    -- all other users only have access to OCs specified in SEGMENT_USER_ATTRIB table
    SELECT COUNT(*)
    INTO TCNT
    FROM SEGMENT_USER_ATTRIB
    WHERE USER_LOGIN = :B00.USER_LOGIN
    AND ATTRIB_ID = 'OC';
    IF TCNT > 0 THEN
    :b00.user_oc := 'SELECT';
    ELSE
    :B00.USER_OC := 'NONE';
    END IF;
    else
    :B00.USER_OC := 'NONE';
    end if;
    --set the email feature
    /* not yet! 8/11/03 */
    /* TDK: Enabled 1/9/04 */
    select COUNT(*)
    into :b00.email_addr_cnt
    from segment_user_email
    where user_login = :b00.user_login;
    if :b00.email_addr_cnt > 0 then
    Begin
         SET_ITEM_PROPERTY('b00.cb_email',ENABLED,PROPERTY_TRUE);
    exception
         when others then
         null;
    end;      
    if :b00.email_addr_cnt > 1 then
         :b00.email_addr := 'choose...';
         rval := populate_group('RG_USER_EMAIL_ADDR');
    populate_list('B01.LI_EMAIL_ADDR', 'RG_USER_EMAIL_ADDR');
    :b01.li_email_addr := get_list_element_value('b01.li_email_addr',1);
    else
         select email
         into :b00.email_addr
         from segment_user_email
         where user_login = :b00.user_login;
    end if;
    else
         SET_ITEM_PROPERTY('b00.cb_email',ENABLED,PROPERTY_FALSE);
         SET_ITEM_PROPERTY('b00.cb_email',TOOLTIP_TEXT,'You do not have access to this feature, Please contact the system administrator to change your privileges.');
    end if;
    -- allow restricted rebate access?
    select count(*)
    into tcnt
    from segment_user_attrib
    where user_login = :b00.user_login
    and attrib_id = 'RSTRREB'
    and nvl(attrib_value,'N') = 'Y';
    -- if have restricted access, show checkbox
    if tcnt > 0 then
    :b00.rstr_access := 'Y';
    :b00.rstr_ok := 'Y';
    else
         :b00.rstr_access := 'N';
         -- hide checkbox
         set_item_property('b00.rstr_ok',visible,property_false);
         :b00.rstr_ok := 'N';
    end if;
    END;
    ---------------------------------------------------------------------------------------------------

    And what is the error you are getting?
    You seem to have forgotten to paste it?
    Navnit

  • Changing current visual attribute property for the entire application

    Hi All.
    I want to change the current visual attribute color of my form at the application level, reason being i don't want to generate all the forms again from scratch.
    I know that we can change this using visual attributes but is there a way to change this through some form setting?(Oracle 10g)

    I know that we can change this using visual attributes but is there a way to change this through some form setting?(Oracle 10g) There are two settings in the formsweb.cfg that could help, but only if all of your foreground and background color settings are set to Undefined. The settings are: lookAndFeel=Oracle and colorScheme=<Choose Scheme> where "Choose Scheme is one of the following scheme's: Teal, Titanium, Red, Khaki, Blue, BLAF, SWAN, Olive, or Purple. The default is Teal.
    The fact that you are using a Visual Attribute for your Forms application color scheme tells me that you are not using the default "Undefined" color setting so changing the *colorScheme* setting will _not_ have the effect you want.
    Since you are using Visual Attributes (VA) to define colors, you will need to change the colors in your VA and then recompile your forms for the changes in the VA to be inherited in your forms. Sorry, that is just the way Forms works. Recompiling all of your forms due to this type of change is not that uncommon and is fairly painless if you have a shell script or batch file that compiles all of your forms for you. There are numerous posts in the forum about how to write a script that will do this, so if you don't have a script yet you can search forum for more details.
    The other option would be to build your own routine that would allow you to read an environment setting or pass the setting in the URL to select a color scheme. Then create a group of Visual Attributes used by these color schemes and apply them in each Form's Pre-Form or When-New-Form-Instance triggers. This is a lot of work, but it would give you the flexibility to change your application's color scheme without having to recompile your forms.
    Having said this, it begs the question - why not just use Oracle's predefined color scheme's or use the *lookAndFeel=Generic* setting so the user's desktop color scheme is inherited by your application.
    IMHO, Visual Attributes are best used to accent an application rather than define their _full_ color scheme. For example, I use VAs to highlight the current record and current item as well as highlight required items.
    As for using "JDAPI" as *WoMo* suggests is a design-time tool - not a runtime tool. Using JDAPI would require you to know Java and you will still have to recompile all of your forms using this tool.
    Craig...

  • Dynamic visual attributes/multi-row blocks

    We're using Headstart, Des2k V6.0.3.8. If you set preference CURREC = multi record block, you get the current record visual attribute (cg$current_record) attached to all displayed items in multi-row blocks. From the Headstart object library, these items also inherit a visual attribute of qms$item_font.
    At runtime, Headstart code is invoked from the block's post-query trigger - this code dynamically assigns a readonly visual attribute to all items that are insert only, or the qms$item_font va to items that are update only. (Incidentally, it seems a bit strange that no va is assigned to items that are neither insertable nor updateable).
    Assigning the va in this way seems to override the current record va for these items, which looks a little strange at runtime. I would prefer to see the current record va overriding the readonly/item_font va. In a future Headstart release, it would be nice if this functionality was configurable, but in the meantime can you suggest the easiest way of making this change to the Headstart code? I think it will be necessary to specifically set the va to stnd/readonly/current record in the when-new-record-instance trigger, & reset it on the post-record trigger. Once va's are being set dynamically, the current record attribute is pretty useless in multi-row blocks.
    Incidentally - we've also changed the behaviour of va's in query mode processing. We wanted the query mode va to override the current record va; qms$record.highlight_items wasn't setting the selected va unless items have a current record attribute of DEFAULT. We wanted query mode to look the same regardless how many rows are in the block; it also looked a little odd in a multi-row block with overflow items, where the overflow items were being highlighted but the rest of the block wasn't. It would be nice if this was also a configurable option.

    Cheryl,
    Good point! It does look a bit odd. I'll take this into consideration for HSD6i.
    To customize your app, try the following.
    Copy qms$event_data_block from qmsevh50.pll to your application library.
    Copy procedure set_nav_items_exg_record from the qms$record package in qmslib50.pll to your application library -AND GIVE IT A NEW NAME- like set_nav_items_custom.
    Change your copy of qms$event_data_block to call this new procedure in the post-query event.
    Modify set_nav_items_custom as follows.
    ============================================
    procedure set_nav_items_custom
    ( p_block in varchar2
    , p_recno in number default current_record
    is
    l_rg_id recordgroup;
    l_rgc1_id groupcolumn;
    l_rgc2_id groupcolumn;
    rg_rows number;
    l_item_flag varchar2(1);
    l_item_name varchar2(100);
    l_first_io_item varchar2(100);
    begin
    qms$block.init_block_rg
    ( p_block,false,l_rg_id,l_rgc1_id,
    l_rgc2_id, rg_rows);
    if id_null(l_rg_id)
    then
    -- no insert-only or update only items
    -- in block
    return;
    end if;
    for j in 1..rg_rows loop
    l_item_name := get_group_char_cell
    (l_rgc1_id, j );
    l_item_flag := get_group_char_cell
    (l_rgc2_id, j );
    if l_item_flag = 'I'
    then
    if l_first_io_item is null
    then
    l_first_io_item := l_item_name;
    end if;
    -- Item is insert-only, update not
    -- allowed
    -- Change background color to
    -- read-only.
    set_item_instance_property
    ( l_item_name,p_recno,navigable
    , property_false);
    /* customization */
    if get_item_property(l_item_name
    , current_record_attribute) is null
    or p_recno <> :system.cursor_record
    then
    /* end customization */
    set_item_instance_property
    (l_item_name,p_recno
    ,visual_attribute
    ,qms$user_prefs.get_va_readonly_item);
    /* customization */
    end if;
    /* end customization */
    else
    -- Item is update-only, insert not
    -- allowed */
    set_item_instance_property
    (l_item_name,p_recno
    ,navigable,property_true);
    /* customization */
    if get_item_property(l_item_name
    ,current_record_attribute) is null
    or p_recno <> :system.cursor_record
    then
    /* end customization */
    set_item_instance_property
    (l_item_name,p_recno
    ,visual_attribute
    ,qms$config.get_stnd_font);
    /* customization */
    end if;
    /* end customization */
    end if;
    end loop;
    -- 18-1-1999: If block only contains no
    -- updatebale items, there are navigable
    -- items left.
    -- If this is the case make first
    -- insert-only item navigable again.
    if get_block_property(p_block,enterable) =
    'FALSE'
    then
    if l_first_io_item is not null
    then
    set_item_instance_property
    (l_first_io_item,p_recno
    ,navigable,property_true);
    end if;
    end if;
    exception
    when form_trigger_failure then raise;
    when others then
    qms$errors.unhandled_exception
    ('qms$block.set_mav_items_custom');
    end set_nav_items_custom;
    ============================================
    Next, as you suggested, add WHEN-NEW-RECORD-INSTANCE and POST-RECORD triggers to handle movement from one record to the next.
    WHEN-NEW-RECORD-INSTANCE
    ============================================
    procedure set_nav_items_wnri
    ( p_block in varchar2
    , p_recno in number default current_record
    is
    l_rg_id recordgroup;
    l_rgc1_id groupcolumn;
    l_rgc2_id groupcolumn;
    rg_rows number;
    l_item_flag varchar2(1);
    l_item_name varchar2(100);
    begin
    qms$block.init_block_rg
    ( p_block,false,l_rg_id,l_rgc1_id,
    l_rgc2_id, rg_rows);
    if id_null(l_rg_id)
    then
    -- no insert-only or update only items
    -- in block
    return;
    end if;
    for j in 1..rg_rows loop
    l_item_name := get_group_char_cell
    (l_rgc1_id, j );
    l_item_flag := get_group_char_cell
    (l_rgc2_id, j );
    if l_item_flag = 'I'
    then
    -- Item is insert-only, update not
    -- allowed
    -- Change background color to
    -- read-only.
    if get_item_property(l_item_name
    , current_record_attribute) is null
    or p_recno <> :system.cursor_record
    then
    set_item_instance_property
    (l_item_name,p_recno
    ,visual_attribute
    ,qms$user_prefs.get_va_readonly_item);
    else
    set_item_instance_property
    (l_item_name,p_recn o
    ,visual_attribute
    ,get_item_property(l_item_name
    , current_record_attribute));
    end if;
    else
    -- Item is update-only, insert not
    -- allowed */
    if get_item_property(l_item_name
    ,current_record_attribute) is null
    or p_recno <> :system.cursor_record
    then
    set_item_instance_property
    (l_item_name,p_recno
    ,visual_attribute
    ,qms$config.get_stnd_font);
    else
    set_item_instance_property
    (l_item_name,p_recno
    ,visual_attribute
    ,get_item_property(l_item_name
    , current_record_attribute));
    end if;
    end if;
    end loop;
    exception
    when form_trigger_failure then raise;
    when others then
    qms$errors.unhandled_exception
    ('qms$block.set_mav_items_wnri');
    end set_nav_items_wnri;
    ============================================
    For the POST-RECORD trigger, you will have to modify your object library since this trigger is not included by default. Add the trigger to the object library CGSO$BLOCK_MR.
    Then add the POST-RECORD event to your copy of qms$event_data_block.
    Finally, add a procedure for the POST-RECORD trigger.
    ============================================
    procedure set_nav_items_pr
    (p_block in varchar2
    ,p_recno in number default current_record
    is
    l_rg_id recordgroup;
    l_rgc1_id groupcolumn;
    l_rgc2_id groupcolumn;
    rg_rows number;
    l_item_flag varchar2(1);
    l_item_name varchar2(100);
    l_first_io_item varchar2(100);
    begin
    qms$block.init_block_rg
    ( p_block,false,l_rg_id,l_rgc1_id,
    l_rgc2_id, rg_rows);
    if id_null(l_rg_id)
    then
    -- no insert-only or update only items
    -- in block
    return;
    end if;
    for j in 1..rg_rows loop
    l_item_name := get_group_char_cell
    (l_rgc1_id, j );
    l_item_flag := get_group_char_cell
    (l_rgc2_id, j );
    if l_item_flag = 'I'
    then
    -- Item is insert-only, update not
    -- allowed
    -- Change background color to
    -- read-only.
    if l_item_flag = 'I'
    then
    -- Item is insert-only, update not
    -- allowed
    -- Change background color to
    -- read-only.
    set_item_instance_property
    (l_item_name,p_recno
    ,visual_attribute
    ,qms$user_prefs.get_va_readonly_item);
    else
    -- Item is update-only, insert not
    -- allowed
    set_item_instance_property
    (l_item_name,p_recno
    ,visual_attribute
    ,qms$config.get_stnd_font);
    end if;
    end loop;
    exception
    when form_trigger_failure then raise;
    when others then
    qms$errors.unhandled_exception
    ('qms$block.set_mav_items_pr');
    end set_nav_items_pr;
    ============================================
    Regards,
    Lauri

  • Changing Visual Attribute in a multi record block---Urgent

    How do I change the visual attribute of a mutirecord item , before it shows, e.g. showing negative items as red and positive as blue.
    Thanks

    You can use set_item_instance property for this purpose . This is an example from Developer help manual
    ** Built-in: SET_ITEM_INSTANCE_PROPERTY
    ** Example: Change the visual attribute of each item instance in the
    ** current record
    DECLARE
    cur_itm VARCHAR2(80);
    cur_block VARCHAR2(80) := :System.Cursor_Block;
    BEGIN
    cur_itm := Get_Block_Property( cur_block, FIRST_ITEM );
    WHILE ( cur_itm IS NOT NULL ) LOOP
    cur_itm := cur_block&#0124; &#0124;'.'&#0124; &#0124;cur_itm;
    Set_Item_Instance_Property( cur_itm, CURRENT_RECORD,
    VISUAL_ATTRIBUTE,'My_Favorite_Named_Attribute');
    cur_itm := Get_Item_Property( cur_itm, NEXTITEM );
    END LOOP;
    END;

  • About Visual Attributes

    1.can we create visual attributes dynamically like record groups.
    2.In forms there is any bulit in which gives the RGB format of particular color,i want to change background color at runtime.
    set_canvas_property(:system.mouse_canvas,BACKGROUND_COLOR,'darkred');
    how i can change the background color of canvas at runtime.
    thank's in advance

    Though you can not create the va at runtime, if you know the possible combinations or may be 10 visual attributes, u can create in the form and set it dynamically at run time. (set_item_property )
    Having said that you can not have any Visual attribute for a canvas. You can have only property class. VA is for text items... PC can not be set at run time.
    Best Regards
    Rajesh Alex

  • Changing visual attribute in Enter Query mode

    Hello, I want to change visual attribute of all items in the first record when the user presses button for Enter_Query. I want that the user sees that the form is in enter query mode and it "waits" for the input of criteria. My code (copied from Help and modified) in trigger WHEN_BUTTON_PRESSED:
    DECLARE
    cur_itm VARCHAR2(80);
    cur_block VARCHAR2(80);
    BEGIN
    ENTER_QUERY;
    cur_block := :System.Cursor_Block;
    cur_itm := Get_Block_Property( cur_block, FIRST_ITEM );
    WHILE ( cur_itm IS NOT NULL ) LOOP
    cur_itm := cur_block||'.'||cur_itm;
    Set_Item_Instance_Property( cur_itm, CURRENT_RECORD, VISUAL_ATTRIBUTE,'yellow');
    cur_itm := Get_Item_Property( cur_itm, NEXTITEM );
    END LOOP;
    END;
    where yellow is the name of my visual attribute.
    The problem is that I need to press the button TWICE to color the record.
    Can anybody help me with this problem?
    Natasa

    (Wrong forum).
    The problem is that enter_query stops executing your procedure until
    another action ist started by the user.
    You must create a short-time timer before issuing enter_query and set
    your colour scheme in the when-timer-expired-trigger.

  • Setting Prompt Visual Attribute Group

    Hi,
    i'm trying to set the prompt visual attribute for a text item is the Forms Builder 6i patch 5. The only available choice is default. I'm using a named visual attribute for the text item and it's working just fine.
    thanks.

    Sorry about this one. I've forgot to change the visual attribute type for prompt.
    thanks.

  • Help: How to create a visual attribute

    I'd like to create VISUAL ATTRIBUTE for prompt. Will someone help me?
    Thank you.

    In Forms Builder there is a node for Visual Attributes. Open this node and create one of type Prompt.
    Select this VA as the Prompt VA for the item prompts.

Maybe you are looking for

  • Changes to sales order item not reflected if Call Transaction is used

    I m updating another Sales Order item quantity and reason for rejection programmatically from another sales order. The code is working fine and the quantity does get changed as well as the reason for rejection flag get set (if required). But if I go

  • Can I use the start up discs for my Powerbook to install 10.4 on my iMac?

    Hi, I just bought a used Powerbook G4 1.67GHz and wanted to use the start-up discs with OS 10.4.2 that came with the Powerbook on my older iMac G4 800MHz. What I really want to do is wipe the hard drive clean on my older iMac and then reinstall OS 10

  • Photo positioning the same on web as in DW 8 - How?

    If you check this page http://www.enhancedwireless.net/TEST.html you'll see the first jpg is what I want re: the look and position of the photo of the CEO, this snapshot is while in DW 8...the 2nd image shows what happens when it's published to the w

  • DB VIEW

    Hi Experts, I have created DATABASE VIEW with to z tables but the output of the view is shows as all the fields are as key fields . if i am going to change the fields as non key field than after activating it again updating as key field so friends pl

  • Partitioning a 1TB hard drive - need help!

    i would like to partition a 1 terabyte external usb hard drive into the following partitions 1 partition to hold a bootable snow leopard installation (so i can reinstall via usb, install bootcamp, add stuff, etc) 1 partition to hold a tiger installat