Change the colour of a cell text depending on the value Web Reports (NW04s)

Hi all,
does anyone know how to change the color of the text of a cell depending on its value on Web Reports? For example red text for values smaller than zero and blue for values bigger than zero?
I know you can create exceptions, but that changes the background color of the cell and not the text color
I have tried modifying the theme but the property "negative text" doesn't related to cell values.
Thanks
C
PD: Point will be awarded!
Message was edited by:
        Carles Prunera

This function changes all numeric fields to blue if no css style is set.
[code]
function turnblue(){
  var cells =document.getElementsByTagName('a');
  for ( i=0; i<cells.length; i++){
    if ( cells<i>.className == '' ){
      var changeColor = checknumber(cells<i>.innerHTML);
// additional condition on value
      if (changeColor) {
        cells<i>.style.color = '#0000FF'
function checknumber(cNumber){
  var x= cNumber
  var anum=/(\d+$)|(\d\.\d$)/
  if (anum.test(x))
    testresult=true
  else{
    testresult=false
return (testresult)
[/code]
hope it helps

Similar Messages

  • How to change the values in report level..

    Hi All,
    I have country dimenssion column in this column haveing more then 500 values.in this I filter 6 countries.
    country names like this
    1.BankUSAgroup-BUG
    2.BankUKGroup-BUG
    3.BankAfricaGroup-BAG
    Like This I want Change this values to USA,UK,Africa.
    Any Help.......
    Thank You,
    Edited by: 958741 on Nov 6, 2012 7:07 AM

    If it's only 6 values you need to change (and not the 500!!) you could use a case statement in the report column formula.
    An example of the syntax is:
    CASE ("GL Calendar"."Fiscal Period Number")
    WHEN 1 THEN 'January'
    WHEN 2 THEN 'February'
    ELSE 'Other'
    END
    So here I'm taking the period number and converting into a period name so you can use the syntax and substitute into this your column and values.
    If its 500 values you might need a more technical solution (e.g. add another column to the dimension and change the ETL to populate this, or have a static lookup table you can use)
    Please mark if helpful or answered
    Thanks

  • How can I change the value in a stepper cell

    In Numbers 2.3 I was able to change the value in a stepper cell by highlighting the value and using the arrow keys to increase or decrease the value. This was a very easy way to input data. Numbers 3.0 when I do this is moves to another cell
    Is there a way to get the use of the arrow keys to change the values in 3.0?
    Thanks

    I use number to keep a running daily tally of the productivity of the members of my group. As each member performs certain tasks, all I had to do was click the up arrow and add to it. IE Jim made 4 widgets yesterday and then made 4 today, I would just hit the up 4 times total 8.
    I guess the good news is when I upgraded to Numbers 3.0, It did not delete Numbers 2.3
    I will continue to use 2.3 until it no longer works, I guess
    Thanks for the replies

  • Issue using JS to change the value of an output text component dynamically

    I am developing an application and I need to change the output text component value at run time when the mouse moves over a field. I am using javascript and then using UIComponent.setproperty to change the value.
    I am not able to do this and am getting nothing.
    Kindly let me know what am I doing wrong
    I am using ADF 11g (10th November release).
    Regards,
    Deepak

    Hi i'm doing the same thing with an input text
    here is my code
    jspx:
    <af:inputText value="#{bindings.MiddleName.inputValue}"
    label="#{bindings.MiddleName.hints.label}"
    required="#{bindings.MiddleName.hints.mandatory}"
    columns="#{bindings.MiddleName.hints.displayWidth}"
    maximumLength="#{bindings.MiddleName.hints.precision}"
    shortDesc="#{bindings.MiddleName.hints.tooltip}"
    id="it4" autoSubmit="true">
    <f:validator binding="#{bindings.MiddleName.validator}"/>
    <af:clientListener type="valueChange" method="mo_UpperCase"/>
    </af:inputText>
    js:
    function mo_UpperCase(event){
    var inputField = event.getSource();
    if (event.getNewValue().toUpperCase()!=event.getNewValue())
    inputField.setValue(event.getNewValue().toUpperCase());
    In my case i change the input text to upercase when the value is changing
    I hope it works with output text also,
    change my examples clientlistener type from valueChange to mouseOver
    If you have more than one component and you need to pass parameters check this thread also:
    bug at af:clientAttribute 11.1.1.2.0
    Tilemahos

  • I want to change the value of a text and this text is called by another text value..

    i have a txt_blk1 up to txt_blk32 and i also have a txt_we  .. if the text_we.text has a value of 1 to 32  how can i change the value of txt_block0-32.text to 0.. the text we already generates its own value so i dont have to use for loop.  i've tried to use  _root["txt_blk"+txt_we.text] = 0; im using actionscript 2 .. can someone help me

    i'm sorry sir.. its just that im on a hurry and i need all the help that i can get for my thesis.. so while i havent figure out what to do for this problem.. i have to move to another problem just to save time. and another thing is i don't really know where did i go wrong..
    this is the code i've put inside the chips
    on (press) {
                        blocknum=32;
              for(i=1;i<=blocknum;i++){
                        if (this.hitTest(_root["block"+i])) {
                                            this._x=_root["block"+i]._x;
                                            this._y=_root["block"+i]._y;
                                            trace("Source "+i)
                                            _root.txt_recent.text = i;
                                            break;
                                  /*if (this._x==_root["block"+i]._x and this._y==_root["block"+i]._y) {
                                            _root.txt_recent.text = i;
                                            trace("block "+i);
                                            break;
              startDrag(this);
              //tempx=this._x;
              //tempy=this._y;
    on (release) {
              blocknum=32;
              for(i=1;i<=blocknum;i++){
                                  if (this.hitTest(_root["block"+i])) {
                                            trace("des1:"+parseInt(_root.txt_recent.text)+3 );
                                            trace("des2:"+parseInt(_root.txt_recent.text)+4 );
                                            trace("des3:"+parseInt(_root.txt_recent.text)+5 );
                                            trace("des4:"+parseInt(_root.txt_recent.text)-3 );
                                            trace("des5:"+parseInt(_root.txt_recent.text)-4 );
                                            trace("des6:"+parseInt(_root.txt_recent.text)-5 );
                                            if(i==parseInt(_root.txt_recent.text)+3 or i==parseInt(_root.txt_recent.text)+4 or
                                               i==parseInt(_root.txt_recent.text)+5 or i==parseInt(_root.txt_recent.text)-3 or
                                               i==parseInt(_root.txt_recent.text)-4 or i==parseInt(_root.txt_recent.text)-5) {
                                                      this._x=_root["block"+i]._x;
                                                      this._y=_root["block"+i]._y;
                                                      _root.txt_we.text = _root.txt_recent.text;
                                                      _root["txt_blk"+txt_we.text].text = 0;
                                                      _root.txt_recent.text = i;
                                                      break;
                                            else{
                                                      this._x=_root["block"+_root.txt_recent.text]._x;
                                                      this._y=_root["block"+_root.txt_recent.text]._y;
                                                      break;
    and this is the code i putted on the block13
    all block have corresponding txt_blk according to its number:
    onClipEvent(enterFrame) {
                        chipnum=24;
                        for(i=1;i<=chipnum;i++){
            if (this.hitTest((_root["chip"+i]))) {
                                  _root.txt_blk13.text = i;

  • Changing the value of a control in a subvi

    I think the answer is out there somewhere but I've read through many threads found with searches similar to this topic so sorry to repost...
    I would like to change the value of a top-level VI control from a sub-vi.  The data is being used as a parameter, I was thinking about using a local/global but I've seen this discouraged.  Is there a way I can do it with references, property, or invoke nodes (or some other suggested method) ?
    I am guessing that if I am not using globals I will need to wire into the sub-vi?
    Dave

    I'd like to clarify what I am trying to do a bit more...
    The sub-vi has a control of the same type as the top-level vi.  The inital control value is being passed into the sub-vi from the top-level vi.  The sub-vi uses the control value in several places through local variables (reading and writing to it)
    I would like to modify the vi so the top-level vi control value changes whenever the sub-vi changes the control value that is passed to it.
    My last attempt was to make a refnum control in the sub-vi (by dragging from top-level block diagram to sub front panel) and then creating a property node from that refnum control.  Using the property node "value" did not give me the value of the control from the top-level vi as I had hoped.  Wiring it to a terminal that was expecting the same type of control (a cluster of two numerics) caused a wiring conflict.
    I noticed elsewhere in the code that the programmer used a text file to save options (unfortunately the control I am working on was not originially included in the options).  There is a vi that, when called, either reads or writes to the text file.  From a C/C++ programming perspective it seems quite odd to me not to just keep all this data in memory and pass it around.  Is using a file to store variables a typical practice in LV programming (even when they are retrieved multiple times during program execution) ?

  • How can I change the default web form names?

    I'm using the web forms in Business Catalyst, but our web site is in Norwegian, so I want the default FirstName and LastName values to be displayed in Norwegian in the error message when the field is not filled out.
    At the moment the user will get an error saying "Skriv inn First Name". "Skriv inn" is correctly translated from English to Norwegian, but the value "First Name" has to be changed. The same applies for "Cell Phone Number".
    Also, I don't really want two fields for the name, I want the form to have just one field that is called "Name" or "Navn" in Norwegian.
    I have tried deleting the name fields and replacing them by custom fields, but then I get an error message when the form is sent saying "ERROR: An error occurred. Your web form must capture customer name and email address. Please fix this issue and re-insert your web form on your web page."
    Also, why does some of the "-" before the error have a space, and some not? I want all the errors to be displayed with a space between the dash and the error.
    The e-mail error is automatically translated into Norwegian for some reason, but it should be a dash in there, so it says "e-postadresse" and not "epostadresse".
    Is there anywhere I can customize these error messages? Or at least change the values of the English fields to Norwegian so the error messages display the Norwegian field names, and not the English?

    That is very helpful! Thank you!
    But how can I change the dashes that are shown before the error? It really annoys me that they are shown inconsistently with different spaces like this:
    - Error 1
    -Error 2
    - Error 3
    -Error 4
    And is there any way to change the automatic translation from English to Norwegian?

  • Magic Mouse changes the values in dialog boxes

    When working in Photoshop and saving files, I noticed that a sideways swipe on the Magic Mouse will change the values in dialog boxes. Unfortunately, it's a little too sensitive. When saving as JPEG and reaching for the keyboard to hit Return for OK, my hand will sometimes lightly brush against the mouse. This invariably has the effect of lowering the JPEG compression amount to zero and ruining the image, so I must turn this feature off or abandon this mouse. Is there a way to do so?

    The horizontal scroll is a pain in the a$$ IMO and many others to. The way to disable it is to type (copy/paste) into a Termainal window the following command line (this is one line, it's shows wrapped due to the forum display layout):
    defaults write com.apple.driver.AppleBluetoothMultitouch.mouse MouseHorizontalScroll -bool NO
    Turn your mouse off and back on and you will then have no more horizontal scrolling.
    To reenable the horizontal scroll change the No to YES in the command.
    There's a little GUI application that can do this for you if you feel uncomfortable using terminal.  It's called MagicMouse Scroll. You have to read the text there to dig out the download link so here's that download link for your convenience:
    http://WWW.atomicsalad.com/other_files/MagicMouse%20Scroll%20Utility.dmg
    You still have to turn your mouse off and back on to get the setting to take effect.

  • How to change the value of a color picker?

    Hi *,
    I am currently working on a small project and I would like to use the colorpicker. When I initialize the colorpicker the, the widget is updated and shows the correct color, but when I try to change the value at runtime, nothing happens. Did I miss something?
    Many thanks
    package javafx.tests.colorpicker;
    import javafx.application.Application;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.geometry.Insets;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.control.ColorPicker;
    import javafx.scene.layout.StackPane;
    import javafx.scene.layout.VBox;
    import javafx.scene.paint.Color;
    import javafx.stage.Stage;
    public class ColorPickerChangeColor extends Application {
         public static void main(String[] args) {
              Application.launch(args);
         @Override
         public void start(Stage stage) throws Exception {
              VBox vbox = new VBox();
              vbox.setPadding(new Insets(10));
              vbox.setSpacing(10);
              Button button = new Button("Press me.");
              final ColorPicker colorpicker = new ColorPicker(Color.BLUE);
              button.setOnAction(new EventHandler<ActionEvent>() {
                   @Override
                   public void handle(ActionEvent arg0) {
                        colorpicker.setValue(Color.YELLOW);
                        System.out.println("Set color of the picker to yellow.");
              vbox.getChildren().add(colorpicker);
              vbox.getChildren().add(button);
              StackPane root = new StackPane();
              root.getChildren().add(vbox);
              stage.setTitle("ColorPicker");
              Scene scene = new Scene(root, 200, 200);
              stage.setScene(scene);
              stage.show();
    }Edited by: 963445 on Jan 3, 2013 12:23 PM

    Yeah, it's a known bug:
    http://javafx-jira.kenai.com/browse/RT-22538 "[ColorPicker] changing color using setValue() ... is not reflected by rectangle and text on control."
    In fact, there are 34 known ColorPicker bugs:
    http://javafx-jira.kenai.com/secure/IssueNavigator.jspa?reset=true&jqlQuery=%28summary+%7E+colorpicker+OR+description+%7E+colorpicker+OR+comment+%7E+colorpicker%29+AND+issuetype+%3D+Bug+AND+status+in+%28Open%2C+%22In+Progress%22%2C+New%29

  • SPEL? make REASON field required if user has changed the value in SALARY

    I have a requirement to make REASON field required if user has changed the value in SALARY field. Is it possible using spel? what are my options?

    Karan,
    You can change the Rendered Property through personalization.
    But in your requirement you need to attach the Spell through personalization & extend the existing CO to set the value of the SPELL based upon the condition.
    Note - Refer this thread http://forums.oracle.com/forums/thread.jspa?threadID=2176729&tstart=0. If you have worked on SSHRParams kindly help the user.
    Regards,
    Gyan

  • I cannot change the value in about:newtab from "newtab" to "blank." The dialog is displayed but when I click Ok, the value is not changed.

    I cannot change the value in about:newtab from "newtab" to "blank." The dialog is displayed but when I click Ok, the value is not changed.
    ===Answer===
    Comment on usual method and solution, by a forum Moderator.
    As long as there are no confounding factors, such as certain extensions, or a user.jsfile the procedure is as follows
    # Open a new tab and type "about:config" in the address bar.
    # In the Search bar type: "newtab"
    # Locate and double click "browser.newtab.url"
    # In the "Enter String Value" box change "'''about:newtab'''" to "'''about:blank'''" and click OK.
    # Verify that the value has changed and now all new tabs will be blank.
    See post under by ''pirate048'' [/questions/976589?page=2#answer-509482] ~J99

    Have to say that I rather agree with Mark..all we want is a simple, unadorned clean page that doe not track and show usage!! WHY NOT!! Is it too simple for developers..we aren't all (nor do we want to be!) software experts! Come on Mozilla..tidy up and clean up..it might be a quicker programme too!!

  • Change the value of a field in a form when the form is displayed

    Hello
    I have a report which has a link to a form for updating the records. I have used a link to the form from report which displays the the record to be updated i.e it gets default values from the report. I need to change one of these values at the time of displaying the form. The set_value in the 'before displaying the page' section doesn't change the vaue displayed in the form. I tried in other 'Advanced pl/sql' sections provided but didn't succeed.
    Thank you
    Jayasree

    hi,
    let's call the new value u want to set "NewValue"
    insert this code in the before displayin' the page
    htp.p('<script language="Javascript1.1">
    function defaultValue(fieldname)
    var thefield;
    for( var v=0; v < document.forms[0].elements.length; v++)
    // get the right field
    if (document.forms[0].elements[v].name.indexOf(fieldname) >= 0 )
    thefield = document.forms[0].elements[v];
                        thefield.value='''||NewValue||''';
    break;
    </script>');
    in the after displaying the page section call the function above with the appropriate field:
    htp.p('<script language=javascript1.1>
    defaultValue(''Field_Name'');
    </script>');
    where Field_name is the name of the field u want to change the value!
    Mohamed

  • Dump when changing the value for a field (of 13 decimals) in alv grid.

    Hi Group,
    Its giving a dump when user is trying to change the value.
    dump description: Unable to interpret "70,000 " as a number.
    what is happening here is, the original value is 50,000 and he is deleting 5 and replacing it with 7, here its throwing the dump.
    If he removes the complete number 50,000 and then gives 70000 its  taking the value.
    I tried to use, the decimals options in alv field catalog but to no joy.
    Please can you give me an advice on this.
    Many Thanks.

    the problem is the comma in the 70,000....that's an alpha character.... Normally, we expect SAP to display numeric fields in a appropriate format, based upon their numeric type, but trying to forcibly insert '70,000' into a true numeric-type field can generate an 'unable to interpret xxx,xxxx  as number' error.
    You could experiment with changing your ALV column to a char17 (or appropriate width) and putting your numeric value into that to display, then converting back to type P, or other field type in the table, in a column that is not displayed, when the user changes the value....  essentially two columns, one not displayed with a routine to copy/convert the numeric field into the alpha field and the reverse when the field is changed.
    But, the better solution is probably for the user to understand that they're seeing a formatted numeric field, and that they need to replace the entire value with the only possible punctuation being a decimal and (if necessary) a negative sign.

  • How do I change the value of the Order By field in an MP3 file?

    good day Guys,
    I'm new here in the forum and I have a question that is "breaking" the order of my songs and my head too ...
    How do I change the value of the Order By field in an MP3 file?
    for example, in the photo below, the song "The Bad Touch" is coming BEFORE the song "A Little Respect", this happens because of the Name field to Order ...
    My "problem" is in the photo below, the "tab" Order, iTunes will not let me erase what is written in the "Sort As" ...
    I've been "collecting" several songs over SEVERAL years
    I'm currently with more than 1,500 songs on HD and several backups on DVDs and external hard drives and I think, download it again, will be a "little" laborious and boring
    I DON'T WANT to be filling the tags of songs (name, singer, CD, year, etc.)
    I have used the program Mp3tag to remove the music tags
    I've tried to download the song again and go through Mp3tag program as if it were a new song
    I've changed the music access permissions, folder and even entire hard drive (my Windows has only one user)
    I've tried to catch the song again, from a previous backup
    I've tried to create a copy of the file at iTunes own
    I've tried to create a new music file in a music recording program
    NOTHING of what I did above resolved
    -> I'm using Windows 7 64-bit Ultimate
    -> I'm using iTunes 12.1.1.4 for 64-bit Windows
    -> My iPad is the third generation (a little old, I know) with Wi-Fi and 3G, but it has served me VERY WELL
    -> The iPad is updated with iOS 8.1.3 and is not unlocked
    I'm sorry for the GIANT post, but well, I think I could explain as much as possible and for my English, too bad, by the way, I'm from Brazil and I'm using Google translator
    Hugs and await answers,
    Paulo Ricardo

    hello turingtest2,
    my language is Brazilian Portuguese (there are some little differences between Brazilian Portuguese and the Portuguese of Portugal, but nothing that interferes with the script)
    at this time, I'm managing songs manually, I don't know if this will interfere with the execution of a script or command
    as I picked up this iPad recently, I still don't understand how to set up the iTunes Music Library and the person who gave me, told me it was easier to put the songs manually
    as you said, in my iTunes, 95% of the songs are with ALL the blank fields, including the Name to Sort field, only songs that begin with a/an/the standing with the Name to Sort field filled with name of the song, without the a/the
    I do not know what to do...
    I want to learn to ride the iTunes Music Library, that my work is less
    you know any site that teaches create/manage my iTunes Music Library?
    this site/forum may be in English, no problem
    thanks for all your help and the help of others who responded to my request

  • How to disable or change the value of h:commandlink jsf component

    Hi,
    I am a student. I am using h:commandlink. I need to change the value of the component once it is clicked by the user. How do i do that?
    If i cannot change the displayed value of the commandlink. I am thinking of atleast disabling the link once the user clicked., to avoid the link being clicked more than once by the user.
    <h:commandlink id = "follow" action = "usermanager.followdoctor" value = "Follow"/>
    Usermanager is my managed bean class for this jsp page. The value "Follow" is the one that i want to be changed to "following" once it is clicked. Please help me. Thanks for your time in advance.

    Hello qimbal2,
    Thanks for getting back to me. you are right , i should disable the link as soon as it is clicked. I went ahead and implemented this logic by using a property in my bean class and binding that property to the value of my link. I wrote the logic in my action method in such a way that when i click on follow for the first time, the value of the link would change to 'Following' and the link would be disabled. It works for me now.
    Thanks,
    Suha

Maybe you are looking for

  • Recommendations for an external hard drive I can use for both the Mac and PC

    Hello, I've used PC's for nearly most of my life, and recently Imade the leap to using a Macbook Pro (the 15" Intel i7) as I got tired of theconstant crashes.  Long story short – Ineed to have a common external hard drive that I can use with both the

  • How to get screen reader to read headings and text in accessible form

    Hi We're trying to build an accessible form using Designer 7.0. When the user tabs to a text field, radio button, combo, etc, the reader (in this case, Windows XP default "Narrator") correctly reads out the widget's caption and current value. However

  • Class of an array

    String abc[] = {}; System.out.println(abc.getClass());The above prints: class [Ljava.lang.String; [/b] Is there such a class ? / which part of JLS specifies that?

  • Adf faces skin-family change for page or component

    I know how to change this by editing adf-faces-config.xml tile. Is it possible to change the skin-family at a page level or for even for an individual component?

  • Report Painter Fonts & Formats

    I have created some report painter reports, but cant find any way of changing the fonts that the results are displayed in? Does report painter only allow one font to be used? Thanks