Current Record Visual Attribute

Hallo,
In a Dev.2.1 Form I have defined a Visual attribute (VA01 - black on yellow) and then in a Data Base block I have assigned VA01 to the 'current record' property.
One item of that block is not a Data Base one. When I scroll the rows of the Base Table only this item isn't affected by the current record visual attribute, i.e. it remains "black on white".
Anyone kwnows why ?
Thanks in advance.
Dino.

The 'Current record Visual attribute' property of that block is already set to VA01. The point is that all of the items of that block iherit the attribute, except the one I said, which doesn't belong to the base table. I ask if this behaviour is normal, and how to do to have also this item to be affected by the same visual attribute !
Thanks.

Similar Messages

  • 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

  • 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

  • Ask: how to set visual attribute

    Hi guys,
    I have a data block named BLOCK1, in BLOCK1 there is a text item named ITEM1.
    I display it in tabular form, showing 10 records.
    I wanted the record where the cursor's located shown in different color.
    For example if the cursor at record #1, record #1 therefore is shown in RED. If the cursor is moved to record #2 then record #2 will be shown in RED and record #1 color will revert back to normal.
    I tried putting WHEN-NEW-RECORD-INSTANCE trigger at BLOCK1 with the following code:
    set_item_property('BLOCK1.ITEM1', VISUAL_ATTRIBUTE, 'WHITE');
    set_item_instance_property('BLOCK1.ITEM1', current_record, VISUAL_ATTRIBUTE , 'RED');
    I thought set_item_property('BLOCK1.ITEM1', VISUAL_ATTRIBUTE, 'WHITE') will set all records of ITEM1 to 'WHITE', then the set_item_instance_property('BLOCK1.ITEM1', current_record, VISUAL_ATTRIBUTE , 'RED') will set the particular record where the cursor is in to 'RED'...
    It doesn't work. All the records that has been set to 'RED' by set_item_instance_property will stay red, set_item_property does not revert them to white.
    Any ideas?

    In the property palette of your block there is "current record visual attribute".
    Assign a valid visual_attribute and then when you move from one record to another it will be applied to the current record.
    Hope it helps you,
    Fabrizio
    If this answer is helpful or correct, please mark it. Thanks.

  • Visual attribute through get_item_property

    Hi People,
    I use forms 10g.While designing the form I wish to assign VISUAL ATTRIBUTE property for my TEXT_ITEM.So i tried wrinting the following code in WHEN-BUTTON-PRESSED of a push button.The code as follows,
    declare
         vlbl varchar(20);
         vatt varchar(20);
    begin
    vatt:=get_item_property('VA7',visual_attribute);
    vlbl:=     get_item_property(':block3.TEXT_ITEM6',vatt);
         end;But it shows me an error as,
    FRM-40105: Unable to resolve reference to item.
    Pls can u help me how to assign the Visual Attribute through get_item_property.
    With Regards
    VIDS

    I tried the same but I am getting FRM-41011: Undefined Attribute.Yes, because you are trying with the visual attribute group property and as i check the GET_ITEM_PROPERTY help it should have work. But also the same error as you mentions Undefined Attribute.
    I also checked the value returned by get_item_property('VA7',visual_attribute) using message which is 'CUSTOM' Yes, it is returns the CUSTOM either you specify the visual attribute group or not.
    So in this case the GET_ITEM_PROPERTY is returning "the name of a logical attribute defined in the resource file" is what I feel.I guess.
    Any idea how "the name of a named visual attribute" can be obtained.The task as the code is looking can be achieved by the following code.
    DECLARE
      vAttribName VARCHAR2(100);
    BEGIN
      vAN:=GET_ITEM_PROPERTY('ITEM_NAME',CURRENT_RECORD_ATTRIBUTE);
      SET_ITEM_PROPERTY('ITEM_NAME',CURRENT_RECORD_ATTRIBUTE,vAttribName);
    END;So, it will set the current record visual attribute property dynamically by the code.
    Also would like to know about resource file? What is it.Well, did not get experience about this matter. And haven't tried before. But maybe documentation will help.
    -Ammad

  • Changing row's visual attribute

    Hi,
    I am populating a multi block record with a cursor, i have a field called read which holds value Y or N, if the value is Y then do nothing and if the value is 'N" then make that entire row in bold fonts. for this i have created a visual attribute group having its foreground font weight as "BOLD' i know what to do , but i dont know where to do it,,item level,block level or form level and in which trigger should i use it?.am using forms 6i.please suggest some methods to do it.

    Hi,
    Just for additional reference, to set a visual attribute to the active record, find the data block node, the selected block, open the block properties, scroll to find the "Records" sections and change the property "Current record visual attribute group"
    cheers,
    Hugo

  • 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

  • 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

  • Current Record Indicator

    I have a multi-record block, where all the items, except for one, are based on the database. That non-database item is a current record visual indicator (a display item). I would like this item (only) to change the colour (ex. to blue) just for the record that is being currently selected. When user leaves the record, it should return to the original (white) colour. I have created a visual attribute group, and based a block's current record visual attribute group on it. However, it has affected all the columns of the block, and not just the indicator. Can anybody help me please, on how I can do that?
    Thanks a lot to everyone!
    Eugene.

    This is how current record visual attribute works.
    If you want to highlight just one item, you'll have to do it manually with the display_item built-in and the when-new-record trigger.
    I think you will be better off just droping the display item and using the default behavior of the current record visual attribute.

  • How to change visual attribute of particular record

    Hai,
    I HAVE ONE BLOCK WHICH DISPLAY RECORDS OF ALL EMPLOYEES
    MY OBJECT IS WHEN EMPNO=12 THEN RECORD VISUAL ATTRIBUTE MUST BE CHANGE LET'S SAY XXX ELSE VISUAL ATTRIBUTE DEFAULT
    PLS HELP

    You should use the SET_ITEM_INSTANCE_PROPERTY built-in procedure ... There is an example in the on-line help of Forms Builder..
    If you need to change a particular record during query , you have to use the code in the POST-QUERY trigger of the block which displays the employee data.
    Simon

  • Applying visual attribute to record dependant on value

    hi guys, i have a form which when queried can show 10 records at a time. What i want to do is that if a certain date field is less than the current date then apply visual attribute group to that whole record (which makes the record red).
    I assume such code would go in post query and i would need to use row id or something?
    or am i approaching it the wrong way.
    Thanks

    Yes, you can use the Post-Query trigger for this. You don't need to worry about the rowid as Forms will already know which record is being evaluated. Your code would look something like the following:
    /* Sample Post-Query trigger */
    /* This sample assumes you have created a Visual Attribute called "DATE_RED" */
    BEGIN
       -- Just compare DATE not DATETIME
       IF ( Trunc(:BLOCK.CERTAIN_DATE) < Trunc(SYSDATE) ) THEN
          Set_Item_Instance_Property('BLOCK.CERTAIN_DATE',CURRENT_RECORD, Visual_Attribute, 'DATE_RED');
       END IF;
    END;You will notice in my code sample that I am using the TRUNC function on the dates. This function will return just the date so the compare looks at just the date. If you need to compare the date AND time, then simply drop the TRUNC function from the code sample. ;)
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • 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...

  • 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;

  • Need to set attribute of current record based on value in next record

    Using Forms 6, I have a form showing a list of records. There can be multiple records with the same ID but having different expiration dates. I need to set attributes to hilite only the record with the latest expiration date. The current list hilites the records with future expiration dates-but we've found that sometimes the subscription is renewed before the old expiration date has been reached, resulting in two records with the same ID having expiration dates in the future.
    I can (and do) sort the records by ID & expiration date so the record with the latest expiration date is always the last one for that ID, so what I want to do is check the next record to see whether or not it has a different ID. If it does then the current record has the latest expiration date & should be hilited. Since I might need to hilite the current record I can't simply navigate to the next record which, from the description I've found, is what the next_record builtin does. Does anybody know how I can check a value in the next record without making it the current record?
    Thanks.

    The database is 10g but I've never heard of the LEAD function before. Now that I've read about it it sounds like I can check the next record using the following:
    LEAD(ID,1,0) OVER (ORDER BY ID ASC) NEXT_ID
    But I'm not sure where to put this. Maybe create a control item & load the value in the POST-QUERY trigger? I'll give this a try but if you have a suggestion I'd be glad to hear it. Thanks. On second thought I don't think selecting the next ID in the POST-QUERY trigger would work as that would require a complete select statement which would start at the top of the list each time, I think.
    Bugger. I can do it in SQL-Plus but I can't see how to incorporate it into the form.
    Edited by: user6931915 on May 18, 2011 11:09 AM

  • Visual attribute help

    I have Datablock A & B...
    Both display 3 columns based on the same table but different schema. Each block displays 15 records .I created a pre-select trigger with the following visual attribute
    For datablock A
    set_block_property('A',current_record_attribute, 'SELECTED_RECORD');
    For datablock B
    set_block_property('B',current_record_attribute, 'SELECTED_RECORD');
    How can I set it so if user chooses datablock A. the visual attribute will appear only for that block and be disabled for datablock B. and vise versa. Is there a way to set the attribute off based on which datablock the user selects

    In the post-block trigger set the current record va to default, then on when-new-block-instance set the current record va to the highlight.
    (these will fire less times then the record triggers above)
    --pat                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for

  • Can PC (i.e.,Windows/ non-Mac) users publish to an iWeb '09 Site?

    I would like to create a website in iWeb '09 which will require multiple users to contribute/publish content, but the other site collaborators do not have Macs, just Windows-based PCs. Question: If multiple people are needed to publish content to the

  • New Workstation Yielding  Poor Performance . . . What's Wrong?

    My new workstation is performing much worse than expected in the PPBM5 test as compared to other computers with the same or very similar components (i7-930 no O.C., 24GM RAM, P6X58D Premium motherboard, EVGA GTX 470 graphics card and PremPro 5.0.2).

  • SAX parser not finding my DTD. Help please

    I have written a small XML file and its DTD that are stored in the same folder which is C:/Work/pdftools. Here is a part of the code that is generating errors: inputSource.setSystemId( "c:/Work/pdftools/userSettings.xml" ); parserAdapter.parse( input

  • Restore database in the same server but with other sid (name)

    i try to restore the database in the same server but with other sid (name) . The backup is on tape and I want to know the steps I should follow. thank.

  • Fill error -50 Can't import over network using new account

    login as admin and can import music from my PC over wireless net (I just tried it). I set up a new account which is also administrator. As far as I can tell the two accounts are identical. I am leaving the files in their original location and not cop