Change color of key field in salv_table

Hello,
this is my first post in scn. This community helped me a lot so far.
Now i have a problem with the SALV. I can change the color of normal fields but not of key fields. I changed the attribute like this:
INCLUDE <color>.
     lv_col-col = col_negative.
     TRY.
         lo_column ?= lo_columns->get_column( 'AUFNR' ).
         lo_column->set_key( ' ' ).
         lo_column->set_visible( 'X' ).
         lo_column->set_edit_mask( ' ' ).
         lo_column->set_color( lv_col ).
       CATCH cx_salv_not_found.
     ENDTRY.
TRY.
         lo_column ?= lo_columns->get_column( 'RSDAT' ).
         lo_column->set_key( ' ' ).
         lo_column->set_color( lv_col ).
       CATCH cx_salv_not_found.
     ENDTRY.
He get the correct column and changes set_key from 'X' to ' ' but the color is still blue. Maybe anyone has an idea what to change on the column object.
Thanks in advance

Hi Marco,
Try to change the key field to normal like this :
lo_column->set_key( if_salv_c_bool_sap=>false ).
Regards,
Tanmay

Similar Messages

  • Reporting: Change Color on Prompt fields

    I need to know if we can change color options for prompt fields?
    Thanks,
    Rick

    Regarding prompt feild no idea.
    We can change the colour of that data which comes after prompting parameter.
    I mean  you have created a parameter Country then you can change the colour of field based on parameter by writing formula.
    Right click on field-> Format field->Font tab->on color clik on X-2
    write formula if {?My parameter}="USA" then red
    Have a look to Sample reports:
    [Crystal Reportsample |https://boc.sdn.sap.com/crsamples]
    Hope that helps!!
    Regards,
    Shweta

  • Changing color of a field after changing the data using OOPS ALV.

    Hi Experts,
    I have displayed three fields (price, no. of products and total amount) in my ALV grid using OOPS.
    Then am changing the data in either price or no. of products fields. When I click ENTER key the value in total amount changes correspondingly. Am able to achieve till this point.
    Now I have to change the color of the three fields( price, products and total amount) of the affected row alone and not the entire set of rows in the output grid.
    Please provide suggestions.
    Thanks in advance.

    Hi,
    You have to use Layout and Output data in your OO ALV. The below code is using FM you can replicate it in OO ALV
    types: begin of t_data,
             flg(3) type c,
             sty    type lvc_t_styl,
             col    type lvc_t_scol,
           end of t_data,
           t_tdata type table of t_data.
    constants: c_red type i value '255',
              c_g   type i value '1'.
    DATA: i_fcat type LVC_T_FCAT,
          s_fcat type lvc_s_fcat,
          s_lay  type lvc_s_layo,
          s_sty  type lvc_s_styl,
          s_col  type lvc_s_scol,
          i_data type t_tdata,
          s_data type t_data.
    s_lay-stylefname = 'STY'.
    s_lay-CTAB_FNAME = 'COL'.
    s_fcat-FIELDNAME = 'FLG'.
    APPEND s_fcat to i_fcat.
    CLEAR: s_data.
    s_data-flg = 'Yes'.
    s_sty-FIELDNAME = 'FLG'.
    s_sty-style = CL_GUI_ALV_GRID=>MC_STYLE_HOTSPOT.
    insert s_sty into TABLE s_data-sty.
    s_col-fname = 'FLG'.
    s_col-color-col = 6.
    s_col-color-inv = 1.
    insert s_col into table s_data-col.
    APPEND s_data to i_data.
    CLEAR: s_data.
    s_data-flg = 'No'.
    s_sty-FIELDNAME = 'FLG'.
    s_sty-style = CL_GUI_ALV_GRID=>MC_STYLE_HOTSPOT_NO.
    insert s_sty into TABLE s_data-sty.
    APPEND s_data to i_data.
    CLEAR: s_data.
    s_data-flg = 'No'.
    s_sty-FIELDNAME = 'FLG'.
    s_sty-style = CL_GUI_ALV_GRID=>MC_STYLE_HOTSPOT_NO.
    s_col-fname = 'FLG'.
    s_col-color-col = 6.
    insert s_col into table s_data-col.
    insert s_sty into TABLE s_data-sty.
    APPEND s_data to i_data.
    CLEAR: s_data.
    s_data-flg = 'Yes'.
    s_sty-FIELDNAME = 'FLG'.
    s_sty-style = CL_GUI_ALV_GRID=>MC_STYLE_HOTSPOT.
    insert s_sty into TABLE s_data-sty.
    APPEND s_data to i_data.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
    EXPORTING
       IS_LAYOUT_LVC                     = s_lay
       IT_FIELDCAT_LVC                   = i_fcat
      TABLES
        T_OUTTAB                          = i_data
    EXCEPTIONS
       PROGRAM_ERROR                     = 1
       OTHERS                            = 2
    IF SY-SUBRC <> 0.
    ENDIF.
    Thanks,
    Kiruba

  • Changing Non key field to Key field in a custom table

    Hello Abap gurus:
    I have a requirement in which i need to change a non key field in my custom table(Z TABLE) to key field.
    For example; i have field sequence as
    field 1  key field
    field 2 key field
    field 3 key field
    field 4 non-key field
    field 5 non-key field
    field 6 non-key field
    field 7 non-key field.
    i want to change field 7 as key field.
    Can i do perform operation??
    when i am tryingto perform bove operation it is taking long time to get the table activated.
    Could any one please help me in getting this resolved.
    regards,
    Sravanthi.

    Use DB Utility (se14) to perform alter table or conversion. The latter is used when atemps to perform first operation fails. Which one is used, really depends on system and current DB table state (i.e. if has any content and what is being adjusted).
    The way Max suggested is similar to [conversion process|http://help.sap.com/saphelp_nw04/helpdata/EN/cf/21f1b8446011d189700000e8322d00/content.htm] which system takes care of itself.
    Refer [Adjusting Database Structures|http://help.sap.com/saphelp_nw04/helpdata/EN/cf/21f1ab446011d189700000e8322d00/content.htm] and already given link to conversion.
    Please also consider potential errors while doing conversion . This can lead to data loss, so you should think of some backup to prevent that.
    Regards
    Marcin

  • To create multiple files on the receiver side based on key field

    Hi Gurus,
    My scenario is File to File
    My Source structure is as below
    My File looks like
    My file looks like below
    570774          11/26/2008 8:12     6296     xxxxxxx     985-399-5157     1153 Teche Road     Morgan City     United States     Lori Eisenman     Louisiana     70380     0          1153 Teche Road     Morgan City     United States     Lori Eisenman     Louisiana     70380     303     101400100000     3365440332522     ELLE YVES SAINT LAURENT Eau de Parfum Spray          2                    61     78     156     184     184     0
    570774          11/26/2008 8:12     6296     xxxxxxx     985-399-5157     1153 Teche Road     Morgan City     United States     Lori Eisenman     Louisiana     70380               1153 Teche Road     Morgan City     United States     Lori Eisenman     Louisiana     70380     376     106074700JP0     3365440347229     GOLDEN GLOSS N° 27Shimmering Lip Gloss          1                    28     28     28               0
    570775          11/26/2008 8:15     6296     xxxxxxx     985-399-5157     1153 Teche Road     Morgan City     United States     Lori Eisenman     Louisiana     70380     7          1153 Teche Road     Morgan City     United States     Lori Eisenman     Louisiana     70380     284     9000400000     3365440316546     L'HOMME  Eau de Toilette Spray          1                    53     53     53     60     60     0
    for each new order number(key field ex: 570774) a new xml file to be created , from the above example 2 xml files sholud be created(one for 570774 and the other for 570775)
    How can i acheive this functionality?
    Please help me on this, Thanks in advance
    Regards
    Srinivas

    Hi Srinivas,
                   map the key field to the parent record of the target field. Use the split by value and change the source key field level to higher one so that the all occurences of the key field are occuring. The mapping will be like this;
    Source Key Field (change to higher level) --> Spli by value --> Filename creation UDF --> Target header field.
    Try this.
    Regards,
    Murugavel.

  • Cannot modify value of primary key field after lookup.

    I realize this could be a WebSphere problem, but I don't know if it is an EJB problem or what? So I'm posting anyway, and adding Duke Dollars in the hopes someone out there has encountered this.
    Okay, I'm using WebSphere Studio Application Developer 4.0.3.
    I am using an EJB that has three primary key fields.
    I use the primary keys to lookup the bean.
    I then want to update the value of one of the primary keys.
    So I create a setter and getter method for that primary key field.
    I then can call the set method, but it does nothing.
    I get no errors.
    It compiles.
    I rebuild, regenerate access beans, and redeploy and rmic.
    I can use ctrl-space to see the functions in the JSP editor.
    However, the set function never gets called for some reason, and I get no runtime exception either.
    For example, if I do this in my code:
    MyBeanFactory myBean = new MyBeanFactory();
    MyBeanKey myBeanKey = new MyBean(name,age,city);
    MyBean myBean = myBeanFactory.findByPrimaryKey(myBeanKey);
    // this function doesn't do anything, because it's a primary key field
    // but it does compile and I get no runtime errors
    myBean.setCity("Orlando");
    // this function works fine, presumably because it isn't a primary key
    myBean.setState("Florida");Questions;
    Is there a restriction that says I can't update the value of a field if it is marked as a primary key?
    If not, what could I be doing wrong?

    Looks like your appserver is working as per the specification.
    Check this out:
    Question
    How can I update the primary key field in a CMP Entity Bean?
    Derived from
    A question posed by Shanks75 shanks75
    Topics
    Java:API:EJB:EntityBean:CMP, Java:API:EJB:2.0
    Author
    Tim Duggan
    Created
    Oct 9, 2001
    Answer
    You cannot change the primary key field of an Entity bean. Refer to page 130 of the EJB 2.0 specification, it states "Once the
    primary key for an entity bean has been set, the Bean Provider must not attempt to change it by use of set accessor methods
    on the primary key cmp-fields. The Bean provider should therefore not expose the set accessor methods for the primary key
    cmp-fields in the component interface of the entity bean."
    A work around to update a primary key field, would be to remove and then an re-create the bean.
    taken from here:
    http://www.jguru.com/faq/view.jsp?EID=515864

  • Report Designer change color

    I created a report using Report Designer and would like to change color of the field base on the data criteria.
    I want to add code using Report Function, but I am not sure how to enter code there and which language I can use.
    Can you please advise me a example how to do the task?
    Your help and information is great appreciated,
    Regards,
    Iccsi

    Hi,
    it's a setting...
    just select the section you want to change to another place, and then select the tabpage "properties"
    There you have an option : 'position'
    The first section in your report (top of page) has position 1, the second position 2...
    So if you want to swap the last section to the first place, just change the position to 1...
    Ciao!
    Joke

  • Changing the length of a key field in a table

    Hi,
    I want to increase the length of the field from 2 to 4 in a standard SAP table and deliver it to the customers. This field is a key field in table. This field from this table is also used in view and view clusters.
    What is the implication of changing the length to the customers. The customers would have already data in this field and they should not loose any data. Will the existing data for customers remain at length 2 or do they have to do some conversion?
    Regards,
    Srini.
    Edited by: Srinivasa Raghavachar on Feb 7, 2008 12:45 PM

    hi,
    The database table can be adjusted to the changed definition in the ABAP Dictionary in three different
    ways:
    By deleting the database table and creating it again. The table on the database is deleted, the inactive
    table is activated in the ABAP Dictionary, and the table is created again on the database. Data
    existing in the table is lost.
    By changing the database catalog (ALTER TABLE). The definition of the table on the database is
    simply changed. Existing data is retained. However, indexes on the table might have to be built again.
    By converting the table. This is the most time-consuming way to adjust a structure.
    If the table does not contain any data, it is deleted in the database and created again with its new
    structure. If data exists in the table, there is an attempt to adjust the structure with ALTER TABLE. If the
    database system used is not able to do so, the structure is adjusted by converting the table.
    Field 1     Field 2,    Field 3
    NUMC,6  CHAR 8    CHAR, 60
    Field 1    Field 2       Field 3
    NUMC,6 CHAR, 8     CHAR,30
    The following example shows the steps necessary during conversion.
    Starting situation: Table TAB was changed in the ABAP Dictionary. The length of field 3 was reduced
    from 60 to 30 places.
    The ABAP Dictionary therefore has an active (field 3 has a length of 60 places) and an inactive (field 3
    still has 30 places) version of the table.
    The active version of the table was created in the database, which means that field 3 currently has 60
    places in the database. A secondary index with the ID A11, which was also created in the database, is
    defined for the table in the ABAP Dictionary.
    The table already contains data.
    Step 1: The table is locked against further structure changes. If the conversion terminates due to an
    error, the table remains locked. This lock mechanism prevents further structure changes from being
    made before the conversion has been completed correctly. Data could be lost in such a case.
    Step 2: The table in the database is renamed. All the indexes on the table are deleted. The name of the
    new (temporary) table is defined by the prefix QCM and the table name. The name of the temporary
    Step 3: The inactive version of the table is activated in the ABAP Dictionary. The table is created on the
    database with its new structure and with the primary index. The structure of the database table is the
    same as the structure in the ABAP Dictinary after this step. The database table, however, does not
    contain any data.
    The system also tries to set a database lock for the table being converted. If the lock is set, application
    programs cannot write to the table during the conversion.
    The conversion is continued, however, even if the database lock cannot be set. In such a case
    application programs can write to the table. Since in such a case not all of the data might have been
    loaded back into the table, the table data might be inconsistent.
    You should therefore always make sure that no applications access the table being converted
    during the conversion process.
    Step 4: The data is loaded back from the temporary table (QCM table) to the new table (with MOVECORRESPONDING).
    The data exists in the database table and in the temporary table after this step.
    When you reduce the size of fields, for example, the extra places are truncated when you reload the
    data.
    Since the data exists in both the original table and temporary table during the conversion, the storage
    requirements increase during the process. You should therefore verify that sufficient space is available in
    the corresponding tablespace before converting large tables.
    There is a database commit after 16 MB when you copy the data from the QCM table to the original
    table. A conversion process therefore needs 16 MB resources in the rollback segment. The existing
    database lock is released with the Commit and then requested again before the next data area to be
    converted is edited.
    When you reduce the size of keys, only one record can be reloaded if there are several records whose
    key cannot be distinguished. It is not possible to say which record this will be. In such a case you should
    clean up the data of the table before converting.
    Step 5: The secondary indexes defined in the ABAP Dictionary for the table are created again.
    Step 6: The temporary table (QCM table) is deleted.
    Step 7: The lock set at the beginning of the conversion is deleted.
    If the conversion terminates, the table remains locked and a restart log is written.
    Caution: The data of a table is not consistent during conversion. Programs therefore should not access
    the table during conversion. Otherwise a program could for example use incorrect data when reading the
    table since not all the records were copied back from the temporary table. Conversions therefore
    should not run during production! You must at least deactivate all the applications that use tables to
    be converted.
    You must clean up terminated conversions. Programs that access the table might otherwise run
    incorrectly. In this case you must find out why the conversion terminated (for example overflow of the
    corresponding tablespace) and correct it. Then continue the terminated conversion.
    Since the data exists in both the original table and temporary table during conversion, the storage
    requirements increase during conversion. If the tablespace overflows when you reload the data from the
    temporary table, the conversion will terminate. In this case you must extend the tablespace and start the
    conversion in the database utility again.
    If you shorten the key of a table (for example when you remove or shorten the field length of key fields),
    you cannot distinguish between the new keys of existing records of the table. When you reload the data
    from the temporary table, only one of these records can be loaded back into the table. It is not possible
    to say which record this will be. If you want to copy certain records, you have to clean up the table
    before the conversion.
    During a conversion, the data is copied back to the database table from the temporary table with the
    ABAP statement MOVE-CORRESPONDING. Therefore only those type changes that can be executed
    with MOVE-CORRESPONDING are allowed. All other type changes cause the conversion to be
    terminated when the data is loaded back into the original table. In this case you have to recreate the old
    state prior to conversion. Using database tools, you have to delete the table, rename the QCM table to
    its old name, reconstruct the runtime object (in the database utility), set the table structure in the
    Dictionary back to its old state and then activate the table.
    If a conversion terminates, the lock entry for the table set in the first step is retained. The table can no
    longer be edited with the maintenance tools of the ABAP Dictionary (Transaction SE11).
    A terminated conversion can be analyzed with the database utility (Transaction SE14) and then
    resumed. The database utility provides an analysis tool with which you can find the cause of the error
    and the current state of all the tables involved in the conversion.
    You can usually find the precise reason for termination in the object log. If the object log does not
    provide any information about the cause of the error, you have to analyze the syslog or the short dumps.
    If there is a terminated conversion, two options are displayed as pushbuttons in the database utility:
    After correcting the error, you can resume the conversion where it terminated with the Continue
    adjustment option.
    There is also the Unlock table option. This option only deletes the existing lock entry for the table .
    You should never choose Unlock table for a terminated conversion if the data only exists in the
    temporary table, i.e. if the conversion terminated in steps 3 or 4. table for table TAB is therefore QCMTAB.
    Hope this is helpful,Do reward.

  • How do I get a field to automatically select a value and change color based on another automatic field?

    Here is the situation:
    I have a row on a form called Finding Risk Rating. In this row are four fields: Probability, Severity, Risk Rating, Color.
    Probability is a drop down menu with the following values: 1, 2, 3, 4, 5
    Severity is a drop down menu with the following values: A, B, C, D, E
    Risk Rating is a field that I have a custom calculation script:
    var riskRating = this.getField("Probability").value+this.getField("Severity").value;
    event.value = riskRating;
    So, when I pick Probability = 1 and Severity = D, Risk Rating will automatically change to 1D, etc. This works fine on the surface as far as I can tell.
    The part where I am stuck, is the fourth field Color.
    Ideally, I want Color to be automatically populated depending on the value of Risk Rating. For example, for 1E I would want it to say "YELLOW" and the field to change color to yellow. For 1A it would be "GREEN" with the color green, etc.
    I tried doing an if else for all cases, but it never refreshes to the correct value. I then checked using app.alert to see what fields riskRating and colorRank are (see code below), and I noticed that riskRating never changes, even though the value in Risk Rating changes. Is there a way to order script(s) so that if I execute one, the other will follow? I'm new to scripting for forms and haven't done any programming in 10+ years, so feel free to rip my code in favor or something more efficient, or direct me to a good resource I can learn from.
    Here's the basis of what I have for scripting on Color. It's brief because I wanted to test it out before writing every 'if else' statement.
    var colorRank;
    var riskRating = this.getField("Risk Rating").value;
    if (riskRating = "1E") colorRank = "YELLOW";
    else if (riskRating = "1A") colorRank = "GREEN";
    else if (riskRating = "5A") colorRank = "RED";
    event.value = colorRank;
    app.alert("colorRank = " + colorRank + ", riskRating = " + riskRating);
    Any help is appreciated. Thanks!

    One problem is if more than one combo box item has the same number associated with it, you cannot simply set the export value to the corresponding number since they need to be unique (or the user interface behaves weird). One thing you can do is set up an object to associate a list item with a value, and look up the value in code when a list item is selected.
    For more information, see: http://acrobatusers.com/tutorials/2007/js_list_combo_livecycle

  • Posting Key Field Status changes - unable to generate Transport request

    Dear All,
    I did posting key field status change from suppress to optional ( P.Key 24).
    However I am unable to generate a transport request.
    Please share your inputs
    Thanks
    Sanjai 

    Hiii sanjai Babu... your client would have set automatic recording of changes in scc4... or the request would be created and yo woulnt have left the page after saving soo it might have been saved... hope it helps...
    Regards
    Abhay

  • Entering multiple entries in ZTABLE after changing a key field to nokey.

    HI Experts,
    This is Hema Iam new To ABAP.
    My senario is I have created a ZTABLE with companycode, GLAccount, costcenter,profitcenter,plant.
    AT first my table has companycode and GLaccount has key fields..
    But to enter the multiple entries for cocode and GLaccount (ZBUKRS and ZHKONT) i have changed GLaccount has non key fields and table maintainence regenarated for the same.
    my issue is as there are repeating entries for cocode and glaccount it is not possible to enter the entries as it is saying the entry is repeated and asking me to skip because cocode is primarykey there...
    how can i overcome thsi issue to enter multipel entries for cocode and GLaccount.
    As it should be done quickly ur help would be usefull
    Thanks In Advance
    L.Hemalatha.

    Hi
    I created zslno field and made it has primary key field aslo but still iam getting eror message while entrying entries as
    "an entry already exists with the same key"
    wht should be done i maintainance recreated after adding this field nad in se14 i adjusted the table too still what steps should be done ?
    eg i need to enter data:
    client cocode  zslno GLacount Cost center profit center plant
    010    1000                 1483100   1001199                       0035
    010     1000                 226100     101199                        0076
    so while entering second record and trying to save iam getting that error.... help me out

  • Depreciation Key field is not in change mode in dep area

    Hello Sap Guru,
    I am facing a problem in my depreciation area. In my depreciation area, field of depreciaiton key is coming in grey mode automaticallly i.e I am not able to enter my dep. key there.
    Please suggest what to do.
    Thanks & Regards
    Deepak Garg

    Hi,
    Where do you want to change the dep key?
    in AS02?
    in OAYZ?
    Go to AO21 and select your screen layout rule 1000 and choose field group rules and for field group dep key, select all check boxes like mnno, Sbno, and copy as maintainance level.
    This will fix your issue.
    Thanks,
    Srinu

  • Simple way to change color of field in an interactive report

    Is there a simple way with css to change the color of a field in an interactive report. I want certain fields to stand out.
    Can you provide an example and where the code is inserted in APEX? TY.

    jfr620 wrote:
    Is there a simple way with css to change the color of a field in an interactive report. I want certain fields to stand out.On what basis?
    The appearance of cells based on the report structure can be controlled using CSS: +{message:id=10373505}+
    Conditional formatting based on cell values is better handled using the built-in highlighting, or Dynamic Actions/JavaScript, which provide better separation of concerns than generating HTML in the query: +{message:id=10493230}+
    (For even better separation, use the Dynamic Action to apply <tt>class</tt>es rather than setting style properties directly, and use separate CSS rules to apply the formatting.)

  • How to Change color on control break fields

    I have created a master detail report. I then did a control bread on the three fields below. I would like to change the color of the break to blue instead of the standard black. What settings or method would I use to change the color on the control break line to blue? TY.
    Request Seq No : 1, Employeee Name : Steve , Supervisor Name : Alex
    John

    Those navbar links are generated by javascript and are not user editable. You can create your own navbar using a Text Based Navbar and then have complete control over font (stick with the Web Safe Fonts), color, size and rollover colors.
    Cyclosaurus has posted an HTML snippet that can change the font style of the navbar of each page that the snippet is applied to. You can find it here: http://discussions.apple.com/message.jspa?messageID=8596966#8596966. This page tells how tol change the navbar test to all caps: http://discussions.apple.com/thread.jspa?messageID=8523772#8523772.
    And the following code, again courtesy of Cyclosaurus will change the rollover color of the navbar on any page the snippet is added to:
    HTML Widget to change rollover color for this page in the navbar above to orange The code used, courtesy of Cyclosurus, is:
    <script type='text/javascript'>
    styleCSS = 'div#widget0 li a:hover{color: orange;}'; // change color to your liking;
    eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[func tion(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'e(c)'\\b','g'),k[c]);return p}('1=2.3.5(\'6\');1.4.7=\'8/9\';1.4(\'a\',\'b\');1.c=d;2.3.e(\'f\')[0].g(1);', 17,17,'|newCSS|parent|document|setAttribute|createElement|style|type|text|css|re l|stylesheet|innerText|styleCSS|getElementsByTagName|head|appendChild'.split('|' ),0,{})); </script>
    You can see an example of that in this demo page: Misc. Items.
    OT

  • Color Changes in Spry Data Fields

    Hi All,
    I'm new to Javascript & PHP  programming. Currently I have coded neccesary apperances for the Web  Page and also Spry Data Set to read an external XML date source file.
    What I need  to do is one of the fields, needs to have color based status changes  based on certain data or criterias received.
    For example,
    I have a  Spry Table displayed on my browser,
    Name
    Current  Status
    Lane
    Jane
    6  Mins
    1
    Peter
    Boarding
    2
    Sally
    Arriving
    3
    Alex
    Delayed
    4
    With the  above, what I need is when the current status show in minutes, the text  color will be white (This has been coded with CSS Style)
    For the  Current Status color changes, when I received anything apart from  minutes, the display will be as of below :-
    Minutes = Black
    Boarding  = Red
    Arriving = Green
    Delayed = Yellow
    My question  is can this be coded with just Javascript, HTML and normal CSS
    OR
    This  needs to be coded in PHP, ASP ?
    I'm not familiar with ASP and only have very  little knowledge of PHP. If anyone here have some experience with this,  can offer some advice on how I can apply this theory into my existing.  And if possible some code example would be great.
    Thanks.

    I have tried many times on Ben's method and it didn't work.
    I have also tried the method from Adobe's documentation site.
    Method 1
    <ul spry:region="dsStates" spry:if="{ds_RowCount} != 0" spry:repeat="dsStates" spry:test="'{name}'.match(/^[amn]/i);" spry:choose="choose">
         <li spry:when="'{name}'.match(/^n/i);" style="color: red;">{name}</li>
         <li spry:when="'{name}'.match(/^m/i);" style="color: blue;">{name}</li>
         <li spry:when="'{name}'.match(/^a/i);" style="color: green;">{name}</li>
    </ul>
    Method 2
    <div spry:region="dsStates" spry:if="{ds_RowCount} != 0">
    <table border="1" spry:repeatchildren="dsStates" spry:test="'{name}'.match(/^[amn]/i);" spry:choose="choose">
         <tr spry:when="'{name}'.match(/^n/i);" style="background-color: red;"><td>{name}</td></tr>
         <tr spry:when="'{name}'.match(/^m/i);" style="background-color: blue;"><td>{name}</td></tr>
         <tr spry:when="'{name}'.match(/^a/i);" style="background-color: green;"><td>{name}</td></tr>
    </table>
    </div>
    Can anyone make it plain and simple of how the data source should look like ?
    I'm posting my source code here to make things easy.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <script src="SpryAssets/xpath.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryData.js" type="text/javascript"></script>
    <script type="text/javascript">
    var KomtarETA = new Spry.Data.XMLDataSet("KomtarETA.xml", "komtareta/bus", {useCache: false, loadInterval: 100});
    </script>
    </head>
    <body>
    <div spry:region="KomtarETA">
      <table>
        <tr>
          <th>Route</th>
          <th>Current</th>
          <th>Destination</th>
          <th>Next</th>
          <th>Lane</th>
        </tr>
        <tr spry:repeat="KomtarETA">
          <td>{route}</td>
          <td>{current}</td>
          <td>{destination}</td>
          <td>{next}</td>
          <td>{lane}</td>
        </tr>
      </table>
    </div>
    </body>
    </html>
    The above is the HTML file I start working with.
    The {Current} field needs to have it's data periodically changing color & addition of flashing effect based on it's input from the XML data.
    So my question is how do I work about ? I don't quite get the explanation above.
    Thanks.

Maybe you are looking for