Need to change color of one column's value depending on the other column

Hi,
i have a search form which displays two column values
First column value's colour should be based on second column's value
For example, if second column has values 'Active', 'Inactive' and 'Pending'
If 'Active' , the first column value's color sholud be 'red'
If 'inacitve, another color ....
Thanks in advance,

Hi!
What we did was we added a column on the VO that returns kind of a css part (for example if a column value is 'Active' the value of this column should be "background-color:rgb(255,0,0);")
Than you use something like this on your column:
inlineStyle="#{row.StatusStyle}"where StatusStyle is the name of the column with "background-color:rgb(255,0,0);" value.
The problem here can be that the background color doesn't cover the whole column but only the text in it (so if it is null, the color is default).
If you want the whole column to be of this color you use something like this:
                                    <af:column ...>
                                      <afh:tableLayout ...>
                                        <afh:rowLayout ...>
                                          <afh:cellFormat inlineStyle="#{row.StatusStyle}" ...>
                                            <af:outputText ...>
                                            </af:outputText>
                                          </afh:cellFormat>
                                        </afh:rowLayout>
                                      </afh:tableLayout>
                                    </af:column>Basically you put another table layout inside a column instead just a outputText (or whatever control you use)
Hope this is understandable and it helps :)
It works for us.
BB

Similar Messages

  • Change color of one column in chart

    Hi
    is there a way to change the color of just one column in a column chart? I want to highlight one column but I can't seem to select just that column.
    Thanks

    Welcome to Apple Discussions
    Click on the table to select it then click on the letter column heading to select the desired column. Now go to the object inspector & select Color Fill from the drop-down menu if it's not already chosen then click on the color box to bring up the color chooser. Select the color you want to fill the column.

  • Change color in alv column

    how do change color of a column in ALV.

    Hi
    The below abap program shows how to change the colour of individual ALV cells /fields. Only a small number of changes are required from a basic ALV grid which include adding a new field to ALV data declaration table(it_ekko), populating this field with the field name identifier and colour attributes and finally adding an entry to layout control work area. These changes are highlighted in bold below.
    REPORT  zdemo_alvgrid                 .
    REPORT  ZALV_CELLCOLOR.
    TABLES:     ekko.
    type-pools: slis.                                 "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
      CELLCOLOR TYPE LVC_T_SCOL,
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    *ALV data declarations
    data: fieldcatalog type slis_t_fieldcat_alv with header line,
          gd_tab_group type slis_t_sp_group_alv,
          gd_layout    type slis_layout_alv,
          gd_repid     like sy-repid,
          gt_events     type slis_t_event,
          gd_prntparams type slis_print_alv.
    *Start-of-selection.
    START-OF-SELECTION.
      perform data_retrieval.
      perform build_fieldcatalog.
      perform build_layout.
      perform set_cell_colours.
      perform display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
          Build Fieldcatalog for ALV Report
    form build_fieldcatalog.
    There are a number of ways to create a fieldcat.
    For the purpose of this example i will build the fieldcatalog manualy
    by populating the internal table fields individually and then
    appending the rows. This method can be the most time consuming but can
    also allow you  more control of the final product.
    Beware though, you need to ensure that all fields required are
    populated. When using some of functionality available via ALV, such as
    total. You may need to provide more information than if you were
    simply displaying the result
                  I.e. Field type may be required in-order for
                       the 'TOTAL' function to work.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      fieldcatalog-key         = 'X'.
    fieldcatalog-do_sum      = 'X'.
    fieldcatalog-no_zero     = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 1.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      fieldcatalog-col_pos     = 2.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 3.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      fieldcatalog-col_pos     = 4.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      fieldcatalog-col_pos     = 5.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      fieldcatalog-col_pos     = 6.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-do_sum      = 'X'.
      fieldcatalog-datatype     = 'CURR'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      fieldcatalog-col_pos     = 8.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    endform.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
          Build layout for ALV grid report
    form build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
      gd_LAYOUT-coltab_fieldname = 'CELLCOLOR'.  "CTAB_FNAME
    endform.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
          Display report using ALV grid
    form display_alv_report.
      gd_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
               i_callback_user_command = 'USER_COMMAND'
               i_grid_title           = outtext
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
               it_special_groups       = gd_tabgroup
              it_events               = gt_events
              is_print                = gd_prntparams
                i_save                  = 'X'
               is_variant              = z_template
           tables
                t_outtab                = it_ekko
           exceptions
                program_error           = 1
                others                  = 2.
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    endform.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    form data_retrieval.
      select ebeln ebelp statu aedat matnr menge meins netpr peinh
       up to 10 rows
        from ekpo
        into CORRESPONDING FIELDS OF TABLE it_ekko.
    endform.                    " DATA_RETRIEVAL
    Form  TOP-OF-PAGE                                                 *
    ALV Report Header                                                 *
    Form top-of-page.
    *ALV Header declarations
      data: t_header type slis_t_listheader,
            wa_header type slis_listheader,
            t_line like wa_header-info,
            ld_lines type i,
            ld_linesc(10) type c.
    Title
      wa_header-typ  = 'H'.
      wa_header-info = 'EKKO Table Report'.
      append wa_header to t_header.
      clear wa_header.
    Date
      wa_header-typ  = 'S'.
      wa_header-key = 'Date: '.
      CONCATENATE  sy-datum+6(2) '.'
                   sy-datum+4(2) '.'
                   sy-datum(4) INTO wa_header-info.   "todays date
      append wa_header to t_header.
      clear: wa_header.
    Total No. of Records Selected
      describe table it_ekko lines ld_lines.
      ld_linesc = ld_lines.
      concatenate 'Total No. of Records Selected: ' ld_linesc
                        into t_line separated by space.
      wa_header-typ  = 'A'.
      wa_header-info = t_line.
      append wa_header to t_header.
      clear: wa_header, t_line.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = t_header.
               i_logo             = 'Z_LOGO'.
    endform.                    "top-of-page
    *&      Form  SET_CELL_COLOURS
          Set colour of individual ALV cell, field
    FORM SET_CELL_COLOURS .
      DATA: WA_CELLCOLOR TYPE LVC_S_SCOL.
      DATA: ld_index TYPE SY-TABIX.
      LOOP AT IT_EKKO into wa_ekko.
        LD_INDEX = SY-TABIX.
      Set colour of EBELN field to various colors based on sy-tabix value
        WA_CELLCOLOR-FNAME = 'EBELN'.
        WA_CELLCOLOR-COLOR-COL = sy-tabix.  "color code 1-7, if outside rage defaults to 7
        WA_CELLCOLOR-COLOR-INT = '1'.  "1 = Intensified on, 0 = Intensified off
        WA_CELLCOLOR-COLOR-INV = '0'.  "1 = text colour, 0 = background colour
        APPEND WA_CELLCOLOR TO wa_ekko-CELLCOLOR.
        MODIFY it_ekko from wa_ekko INDEX ld_index TRANSPORTING CELLCOLOR.
      Set colour of NETPR field to color 4 if gt 0
        if wa_ekko-netpr gt 0.
          WA_CELLCOLOR-FNAME = 'NETPR'.
          WA_CELLCOLOR-COLOR-COL = 4.  "color code 1-7, if outside rage defaults to 7
          WA_CELLCOLOR-COLOR-INT = '0'.  "1 = Intensified on, 0 = Intensified off
          WA_CELLCOLOR-COLOR-INV = '0'.  "1 = text colour, 0 = background colour
          APPEND WA_CELLCOLOR TO wa_ekko-CELLCOLOR.
          MODIFY it_ekko from wa_ekko INDEX ld_index TRANSPORTING CELLCOLOR.
        endif.
      Set colour of AEDAT field text to red(6)
        WA_CELLCOLOR-FNAME = 'AEDAT'.
        WA_CELLCOLOR-COLOR-COL = 6.  "color code 1-7, if outside rage defaults to 7
        WA_CELLCOLOR-COLOR-INT = '0'.  "1 = Intensified on, 0 = Intensified off
        WA_CELLCOLOR-COLOR-INV = '1'.  "1 = text colour, 0 = background colour
        APPEND WA_CELLCOLOR TO wa_ekko-CELLCOLOR.
        MODIFY it_ekko from wa_ekko INDEX ld_index TRANSPORTING CELLCOLOR.
      ENDLOOP.
    ENDFORM.                    " SET_CELL_COLOURS

  • How to change colors of individual column bar in the same data series

    in mac numbers, how to change colors of individual column bar in the same data series. The entire column series gets selected in the column bars and cannot select to change colors of specifc bars.

    Hi Kiran,
    no its not possible through Theme editor also ,because these colors are coming from Compiler which u are using.
    Regards,
    Govindu

  • I have a 3 year old MacBook Pro with MAC OSX 10.6.8, iPhoto '09 version 8.1.2 and have downloaded two software programs: one is Aperture 3.2 and the other is Photoshop Elements 9 (which I got from a friend who didn't need it). I am totally happy with the

    I have a 3 year old MacBook Pro with MAC OSX 10.6.8, iPhoto ’09 version 8.1.2 and have downloaded two software programs: one is Aperture 3.2 and the other is Photoshop Elements 9 (which I got from a friend who didn’t need it).
    I am totally happy with the way iPhoto organizes my photos and how I can work with iMovie to create slide shows with music from iTunes, etc.
    I have been shooting mostly high resolution jpegs and I continue to learn more and more about photography, post processing etc. I realize that the small adjustments I can make in iPhoto are good, and are adequate most of the time. However, a have started to experiment with shooting RAW images and would like to go the next step, ie. post processing.I am totally technically challenged and need SIMPLE, INTUITIVE programs and am certainly NOT anywhere ready for Photoshop CS whatever!
    After having these programs sit on my computer, I decided to try to see if I could figure them out. When I opened Aperture, this is what first comes up.
    “Welcome to Aperture 3.2
    Your library needs to be upgraded to work with this version of Aperture. Once upgraded, you will not be able to use this library with previous versions of Aperture.
    Upgrading a library from previous versions of Aperture 3 generally takes a few minutes or less, though larger libraries will take longer. After that, Aperture 3.2 will upgrade your library's thumbnails, but you can use the application during that time.
    Tip: To open a different library, quit Aperture and hold the Option key down while starting Aperture
    Current Library Location:
    Jadzia (home)   -----Pictures------Aperture Library
                                                      QUIT             UPGRADE”
    I have heard horror stories  about moving your entire library to Aperture, ending up with 2 libraries, etc. etc. hence my previous reluctance in attempting Aperture. In addition, many of my photography friends are saying: Go with Lightroom 3.....you’ll love it!
    So here is my dilemma.  I don’t want to mess around with my iPhoto library. All I want to be able to do, is to isolate a few photos, export them to Aperture, Elements, and work on them there, then bring them back into iPhoto.
    Can I do this? Should I forget about Aperture and Elements and look at purchasing yet another program like Lightroom?

    Export those few photos via the File ➙ Export ➙ File Export menu option with Kind = Original to the Desktop.  Then import them into the Aperture library. That would keep one copy in your iPhoto library and another in your Aperture library to edit, etc.
    You can use Photoshop Elements 9 from within iPhoto as your editor of choice. However, if you edit a raw file in iPhoto with PSE9 the resulting edited version must be saved outside the iPhoto Library and imported back in as a new file.  For editing jpegs just do a Save (not a Save As) and it all will be kept within iPhoto. 
    Using Photoshop or Photoshop Elements as Your Editor of Choice in iPhoto.
    1 - select Photoshop or Photoshop Elememts as your editor of choice in iPhoto's General Preference Section's under the "Edit photo:" menu.
    2 - double click on the thumbnail in iPhoto to open it in Photoshop.  When you're finished editing click on the Save button. If you immediately get the JPEG Options window make your selection (Baseline standard seems to be the most compatible jpeg format) and click on the OK button. Your done. 
    3 - however, if you get the navigation window
    that indicates that  PS wants to save it as a PS formatted file.  You'll need to either select JPEG from the menu and save (top image) or click on the desktop in the Navigation window (bottom image) and save it to the desktop for importing as a new photo.
    This method will let iPhoto know that the photo has been editied and will update the thumbnail file to reflect the edit..
    NOTE: With Photoshop Elements  the Saving File preferences should be configured as shown:
    I also suggest the Maximize PSD File Compatabilty be set to Always.  In PSE’s General preference pane set the Color Picker to Apple as shown:
    Note:  to switch between iPhoto and PS or PSE as the editor of choice Control (right)-click on the thumbnail and select either Edit in iPhoto or Edit in External Editor from the contextual menu. If you use iPhoto to edit more than PSE re-select iPhoto in the iPhoto General preference pane. Then iPhoto will be the default editor and you can use the contextual menu to select PSE for your editor when desired.
    OT

  • 2 different iphones have the same Apple ID, how can I change the apple ID on one of them but not delete the other iphone's data and media?

    2 different iphones have the same Apple ID, how can I change the apple ID on one of them but not delete the other iphone's data and media?

    You don't have to do anything with the first iPod that you don't use anymore. If you are planning on keeping it, put in a drawer in your house and forget about it.
    You don't need a second account to use with the new iPod. I use one Appl e ID and iTunes library for two iPods, and two iPad. I have different content on all four devices. You can select exactly what you want to sync to each device and it can be different content on all devices.

  • I have just purchased the new macbook pro 15" and see that it comes with 2 discs in the box, one being Mac OS X and the other being Applications Install DVD. Are these pre installed? or do I need to insert the discs and install them?

    I have just purchased the new macbook pro 15" and see that it comes with 2 discs in the box, one being Mac OS X and the other being Applications Install DVD. Are these pre installed? or do I need to insert the discs and install them?

    All has been installed. Those are there in case you need to do a reinstall. Unlike most Windows based hardware vendors these days. Apple still ships software you might need in case a drive fails. Even in the case of the new MacBook Air, Apple ships the software on a flash drive.

  • TS3899 "cannot get mail" in iphone5 suddenly. been using iphone to check 2 email accounts for months now, one is gmail and not troubled. the other is thunderbird and i get this error message now. no settings have been changed or anything! ideas?

    hey all, I have been getting the "cannot get mail" error message on my iphone5 suddenly.
    ive been using iphone to check two email accounts for months now, one is gmail and not troubled. the other is mail from thunderbird and i get this error message now saying it is not responding. no settings have been changed or anything, it just suddenly stopped receiving mail on my device as of Tuesday afternoon.
    Does anyone have iny ideas about why? i have yet to update to the new OS7 yet, could that be it?

    'The installer has insufficient privileges to modify this file C:\Program Files (x86)\Common Files\Apple\Apple Application Support\Web kit.resources\inspector\Images\Spinner Inactive Selected.gif.'
    That one's consistent with disk/file damage. The first thing I'd try with that is running a disk check (chkdsk) over your C drive.
    XP instructions in the following document: How to perform disk error checking in Windows XP
    Vista instructions in the following document: Check your hard disk for errors
    Windows 7 instructions in the following document: How to use CHKDSK (Check Disk)
    Select both Automatically fix file system errors and Scan for and attempt recovery of bad sectors, or use chkdsk /r (depending on which way you decide to go about doing this). You'll almost certainly have to schedule the chkdsk to run on startup. The scan should take quite a while ... if it quits after a few minutes or seconds, something's interfering with the scan.
    Does the chkdsk find/repair any damage? If so, can you get an install to go through properly afterwards?

  • How should I do if I paid monthly payment twice for a month. One is by Auto payment and the other is by hand... Is it possible to get refund? don't I need to pay for it next time?

    How should I do if I paid monthly payment twice for a month. One is by Auto payment and the other is by hand... Is it possible to get refund? don't I need to pay for it next time?

    I know a couple others that waited for two billing cycles but it will come back as a credit on that account.

  • I NEED TO SHARE MY LR CATALOGS FROM LAPTOP TO MAC AND EVEN IPAD WITH NO EXTERNAL DEVICES - I WOULD LIKE ANY EDIT I MAKE FROM ONE COMPUTER TO BE MADE ON THE OTHER - HOW DO I DO THIS ?? THANKS!!

    I NEED TO SHARE MY LR CATALOGS FROM LAPTOP TO MAC AND EVEN IPAD WITH NO EXTERNAL DEVICES - I WOULD LIKE ANY EDIT I MAKE FROM ONE COMPUTER TO BE MADE ON THE OTHER - HOW DO I DO THIS ?? THANKS!!

    All the info you do with your image files is stored in the Lightroom Catalog file. The Catalog file cannot be located on a network it must have a physical connection to the computer.
    While the Catalog is in use a LOCK file will be temporarily placed alongside which prevents its use by any other device.

  • I need to change my Apple id in my phone to match the new id i set up online.  How do I do that?  I dont have the password to that email address.

    I need to change my Apple id in my phone to match the new id i set up online.  How do I do that?  I dont have the password to that email address.

    Go to Settings>Store (or Settings>iTunes and App Stores for iOS 6) and sign out and sign in with the other/updated account.

  • HT5312 Hello everyone, i need to change my rescue email address in order to retrieve the answers to my secret questions which I forgot. Any clues on how to do that? Thanks in advance

    Hello everyone, i need to change my rescue email address in order to retrieve the answers to my secret questions which I forgot. Any clues on how to do that? Thanks in advance

    If you can't remember your security questions go to  Express Lane , select iTunes from the list, then iTunes store.    On the next screen select account Management.    There, select iTunes store account security and write that you would like to reset your security questions and / or answers.
    You should get an eMail reply over the next 24 hours.

  • Hello!  I need Apple (!!!) headphones for Ipod Shuffle 3! (only apple earphones with remote and mic!!!) Tell me, what distinguishes the model are presented in black and white boxes? They may differ in features? Can one model is more modern than the other?

    Hello!
    I need Apple (!!!) headphones for Ipod Shuffle 3! (only apple earphones with remote and mic!!!)
    Tell me, what distinguishes the model are presented in black and white boxes? They may differ in features? Can one model is more modern than the other?
    Thanks in advance!

    Hi Fencer1986,
    I apologize, I'm a bit unclear on your request. If you have questions about headphone compatibility for your iPod shuffle 3rd Gen, you may find the following article helpful:
    iPod shuffle (3rd generation): About headphone compatibility
    http://support.apple.com/kb/ht3472
    Regards,
    - Brenden

  • I need to change my security questions. But it's sending the link to an old email. Suggestions?

    I need to change my security questions. But it's sending the link to an old email. Suggestions?

    You won't be able to change your rescue email address until you can answer your questions, you will need to contact iTunes Support / Apple in your country to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset you can then use the steps half-way down this page to update your rescue email address for potential future use : http://support.apple.com/kb/HT5312

  • Hi! when starting my computer the background went gray with two hard drives in the middle. One is named macintosh HD and the other recovery 10.9. I have my whole life on my computer, and i don't know which of them i should start up? Please i need help!

    Hey!
    when starting my computer the screen is gray with two harddrives. One is named Macintosh HD and the other Recovery 10.9. My computer has never done this before! I am really worrid that my files will be lost if i choose to start the wrong harddrive. Which one should i choose? HELP!!

    You probably held down the Option or Command R keys when you heard the startup tone. Simply choose the HD. To learn what the Recovery partition is please read OS X: About OS X Recovery

Maybe you are looking for