Select the color based on the value of the selected list

Hello

Is could someone please tell me if it is possible to display a LOV with a background color according to the selected value?

In fact, I have a report with many selection lists whose value can be N/A Y, N, and I would like that the corresponding LOVs have the background in color according to the value.

Thanks in advance,

Andreea

Published by: user12064977 on October 20, 2009 02:15

Oh! I have not read the word "report" in your original post and I took your page as a form... :(

OK, first of all, run your page and see the HTML source generated for it. Note the value of the attribute "name" for all the columns in the report when you use selection lists. Now using JS, set the background color for them.

Suppose "f03" is the name for your selection list value, then

Try the code in the following page footer section



CheersHari 

Tags: Database

Similar Questions

  • State of color lines based on a value in the same row

    I would like to color report lines based on a value in the same row.

    For bolting with the table 'EMP ':

    I would like job = MANAGER and Red work = CLERK to be green etc etc.

    The other example I found was the possibility of a single color either the nail or the default color.

    I'm looking for a way to do multiple colors.

    Hello

    In the model line, you can use #1 #, 2 # #, etc. to indicate where a field in the report should be released. It doesn't have to be clear - that is to say, you can use it in style tags if you wish.

    So take a query such as:

    SELECT EMPNO,
    ENAME,
    DEPTNO,
    DECODE(DEPTNO, 10, 'green', 20, 'red', 30, 'cyan', 'white') BG_COLOUR
    FROM EMP
    

    You get the column 1 = empno, 2 = ename, 3 = deptno and 4 = bg_colour. In the model line, you can then do:

    Before defining lines (implements the table):

    <table>
    <tr><td>ID</td><td>Name</td><td>Dept</td></tr>
    

    After setting (farm table) lines:

    </table>
    

    Model 1 (used for all lines) line:

    <tr style="background-color:#4#;"><td>#1#</td><td>#2#</td><td>#3#</td></tr>
    

    Then, for each row, the color that has been calculated by using the DECODE function is used in the style tag for color the background of the whole line.

    How to determine the colors, it's you. I used DECODE here, but you can use a field on the DEPT table to hold and use it in your SQL statement.

    Andy

  • Change the fill color based on the range of values

    Creating a form to inspect the parts. Work on the setting up of a text field to change the fill color based on the number or the data entered. For example: If is between 0-20 fill color is red, between 20-24 fill color is green, more filling 24 is still red, and if no data is entered in the fill color is white. The script below works for me but keeps the red field when data is deleted (empty) field. Not sure if im approaching this correctly so I should be looking at differently? I have different ranges for many fields and im trying to keep the script right to the front as possible. Thanks in advance for any help.

    If (event.value > '24')

    event.target.fillColor = color.red;

    Else if (event.value < '20')

    event.target.fillColor = color.red;

    else event.target.fillColor = color.green;

    You do not have... Change this line:

    Else if (event.value > '24')

    To do this:

    Else if (event.value > 24)

    And even with "20".

  • Delete in the database based on the values of the multiple selection list

    Hello

    I have a selectlist in Apex and a function in the database to make a deletion based on the value selected in the selection list.
    FUNCTION delete_batch (v_batch VARCHAR2) RETURN VARCHAR2
    IS
    BEGIN
    IF v_batch like 'M%'
    THEN
       RETURN ('A monthrun cannot be deleted');
    ELSE
       DELETE FROM so_disco_pa
       WHERE  batch = v_batch
       ;
       DELETE FROM so_batch_pa
       WHERE  batch = v_batch
       ;
       COMMIT;
       RETURN ('Batch '||v_batch||' has been deleted');
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
        RETURN ('Batch could not be deleted');
    END delete_batch;
    The package is called when the user clicks on the button Delete with the rest of the process:
    BEGIN
    DECLARE
    x   varchar2(100);
    BEGIN
    x := pa_control.delete_batch (:P3_BATCH);
    :F105_MESSAGE := x;
    END;
    END;
    Now, I want to change the selectlist for a multiple-selection list to make several batches can be deleted.

    How can I change my procedure and the procedure to remove lots based on the values selected?

    Thank you

    Diana

    dianap says:
    I got this far, but only the first batch selected in the list is being deleted. The other values of selected package are not removed.

    Help please.

    Move the RETURN statement out of your loop.

  • Javascript-based dynamic action and display the value of (!) from the selection list

    Hello

    I'm not a jQuery guru (yet).
    Can someone show me how to turn on or off an ITEM on a form based on the value display of a selection list (usually I have dynamic lists, so I don't 'know' even internal values)

    I created a simple demo in which you can (if you want to) show me how it works.

    Workspace: 6POOLRULES
    User: demo01
    Password: demo
    Application: 30851 (Drone)

    The idea is to
    * Disable/hide the "Id other Description" If the ' Id Type (display value!) is 'Passport' or 'license '.
    * activate/display the Description of the 'other' Id if the ' Id Type (display value!) is "other".


    I think that it should be dynamic action based on javascript/jQuery. But what would this jQuery selector should look like?

    Published by: bveoracle on March 29, 2012 07:28

    Published by: bveoracle on March 29, 2012 07:30

    Hello

    OK, I changed the dynamic action to use Jquery and get text from the value. The only thing I changed is in the section WHEN.

    Enjoy.

  • ADF Table cell color based on the value of this field

    Dear all,
    I want to create a table for our new application that contains a table that is used to represent the data in a table or matrix format.
    and each cell of the table should be filled with a color of three colors, based on the value belongs to who will for example: (1-8-> green, 9-20 - yellow etc.).
    I don't know how to implement this. Help, please...

    Rognard

    Please post in the subforum that is appropriate for your question.

    http://forums.Oracle.com/forums/Ann.jspa?annID=599

    This blocking thread

  • Change the fill color based on the value

    I found several good examples on how to change the color of a galld based on a value, but am not having implemented lucky.  My form is an assessment to 3 areas of the exam results, the total of all 3 can have a maximum value of 100.  Sections 1 and 2 are automatically calculated, and section 3 is a value that the user will enter based on the review of all comments, notes, etc.  The final score has a rating and outstanding 90-100, satisfying 70-89, unsatisfactory < = 70.   Right now I'm not so concerned about the number of color, but I'm not able to get the colors to change at all.  Because this field is calculated based on chapters 1 to 3, I put the code on its change event.  Once the user enters the final score of manual in section 3, the value is changed automatically.  I also tried the partition article 3 manual output event and have obviously not the code or where to put this right.  Here is the code I use and would appreciate any help.  If I can learn how to make 90-100, I hope I can apply the same method, a different color of 70 to 89 and the title of 70.  What I am doing wrong?  Thank you.

    Form1. #subform [0]. OverallSafetyPerformance::change - (JavaScript, client)

    If

    ( this.rawValue < = 100) & & this.rawValue > = 90

    {

    this.fillColor

    = "102,179,255" "

    }

    I have an example for you, but it seems that the download has been disabled again.  Send me a direct email with your email address and I will send you the document.

  • Select the value of the text element based on the selection list

    Hello

    I have a selection list that displays a number of codes of a table, and I want to display the description of the code (from the same table) in a field of text next to it.

    The selection list works good based on an LOV, but I can't seem to find how to get the return value, so I can identify the correct description of the table to be displayed.

    Thank you

    See this link: http://htmldb.oracle.com/pls/otn/f?p=31517:80:6340934958598741:NO

    It will have a lov that calls an application process that fills a text box...

    Thank you

    Tony Miller
    Webster, TX

  • dynamically change the value of a selection list in the form based on a table

    Hi friends,

    I use a form based on a table. I want to display two fields in the form of lists of selection instead of text boxes and when a value

    in a select list is selected, the corresponding values will be included in the next list of selection. For example if Department

    value is selected in a selection list that employees in this Department will be included in the employee selection list. I saw a

    even using ajax to achieve this as a table in the Dene example application [click here | http://apex.oracle.com/pls/otn/f?p=31517:176:462842537250908:NO].

    Is it possible to achieve the same for a form based on a table.

    Thank you
    TJ

    Hi TJ.

    Take a look on: [http://apex.oracle.com/pls/otn/f?p=56976:4] - instructions are on the page

    Andy

  • Sending e-mail based on the value selected in the select list

    Hi all
    I have a request when there is a list of select 'Choose with Submit', considers this point as & P5_STATUS. with 2 values approved and rejected.
    There are 2 methods of mail send different:
    1. process e-mail with approved content, that will be executed when the approved value is returned by the select list item "Status,"
    2 process e-mail with rejected, elements that will be executed when the rejected value is returned by the select list item "Status,"

    The foregoing is the requirement.

    How I can get it working, what exactly should I do in the part 'Condition' of the 2-mail process.

    Help, please!

    Hi Suzi,

    You must select "value of element in the Expression 1 = Expression 2" as a condition in the process of your mail. For the approved procedure, write approved as Expression 2 in the State and rejected for the rejection process. For both processes write P5_STATUS in the Expression 1.

    Hope that helps.

    Kind regards

    Sergio

  • change the field type selection list of text based on the data in the other domain.

    Hello

    We have a requirement where we are looking to display the page as element select list or a free text field based on the value of the item to another page.

    Say, we have two fields

    Day:

    Products:

    If day = 'Monday' produced a drop in low field of another product would be a free text field.   Is this possible in APEX?

    This is the configuration I did.

    I used the field produced twice (as a text and list field select) as an element of a page., dependent on the value of the day I used the dynamic properties of actions to show/hide these fields.

    However, when I click on submit, it throws an error:

    ORA-06550: line 1, column 108: PL/SQL: ORA-00957: name of column in double ORA-06550: line 1, column 13: PL/SQL: statement ignored


    Kind regards

    Satya

    You can have both share the same database column, the process of the APEX DML does not know how to consolidate.

    You will need to add a calculation and determine the real value based on two fields, up to an only one mapped to db.

  • Tabular presentation - column to turn it off (with picture) based on another value of the column

    Hi all

    I haven't worked much on tabular forms and JS. I'm looking for help in this regard.

    I'm working on a tabular presentation. with several editable fields... I need to disable a column (just for this single line), which contains an image, based on a field of LOV (static) list) (Y/N). The image column must be disabled if the value is N.

    My SQL for the report is something like this: (will keep things simple)

    Select

    emp_id,

    emp_name,

    static_list,

    (case when STATIC_LIST = "Y" THEN ' < a title = "Edit SAMPLE TBL" href = "f?) p = & APP_ID.:10: & APP_SESSION.:NO:P10_EMP_ID, P10_EMP_NAME :'|| EMP_ID | «, » || EMP_NAME | "" "> < img src =" "#IMAGE_PREFIX #SAMPLE.gif" border = '0' (> < /a > ' other ' ' end) as disable_col, "

    dept_name

    of sample_table

    I scoured the topics in this forum. Most of them were made using the table ID f_001, f_002.

    I tried to follow the same path by inspecting the item but the disable_col does not have any ID.  Let's say, f_003 is for the static list and f_004 is assigned to dept_name.

    I tried dynamic actions, but it did not work. Read in a topic that dynamic action does not work on tables. So I chose this approach. Is there a simpler way to solve this?

    need your help on how to proceed with this scenario. Thank you in advance.

    Versions: Apex: 4.2, DB: 11 g

    Thank you

    Daniel

    Hi Daniel_A,

    Daniel_A wrote:

    I did my job in Page 4.

    If the IS_VALID column is select as 'Yes' then the column hyper must be enabled, allowing the user to click on it. If she chose the 'no', then the column Hyper must be disabled for this line.

    The initial question about toggle the hyperlink is resolved. Check your App-> Page 4 35160.

    This is done with the help of two dynamic actions:

    • DA first loading of the Page / after updating of region "tabular":

    Event: After refresh

    Selection type: region

    Region: The other 'tabular '.

    Condition: No strings attached

    Action: Run the JavaScript Code

    Fire on loading the Page: Yes

    Code:

    $( 'select[name="f08"]' ).each(function() {
      if ( $(this).val() === "N" ) {
        $(this).closest("tr").find('td[headers="HYPER"]').find("a").addClass("apex_disabled").unbind("click");
      }
    });
    

    Items concerned: no item affected

    • Second DA on the evolution of the selection list:

    Event: change

    Selection type: jQuery Selector

    jQuery Selector: select [name = "f08"]

    Condition: No strings attached

    Action: Run the JavaScript Code

    Fire on loading the Page: No.

    Code:

    var el = this.triggeringElement;
    if ( el.value === "N" ) {
        $(el).closest("tr").find('td[headers="HYPER"]').find("a").addClass("apex_disabled").unbind("click");
    } else {
        $(el).closest("tr").find('td[headers="HYPER"]').find("a").removeClass("apex_disabled").bind("click");
    }
    

    Items concerned: no item affected

    NOTE: as the original question/topic related to toggle the image link in the column, for the problem with the Page 5, please create a new thread with the details.

    Kind regards

    Kiran

  • jQuery to update the background color select list

    I have this element in a tabular presentation.

    < select name = "f15" id = "f30" autocomplete = "off" >

    < option value = "" selected = "selected" > < / option > "

    ROSE < option value = "PINK" > < / option >

    < option value = "SILVER" > SILVER < / option >

    < / select >

    I try to use jQuery to f30 in the table, then for each item in this table cross list items and set the background color for what is in the value field.

    But I can't even the value of each item in the selection list. This.Value and $(this) .val () return null.

    This is my small effort:

    $("[name="f15"]').each (function () {}

    line = apex.jQuery (this) .closest ('tr');

    Alert ('value =' + This.value);

    Alert ('value =' + $(this).) Val());

    . style.backgroundColor $(this) = this.value;

    $(this) .css ({backgroundColor: this.value});

    $(this) .css ("background-color", "red");

    });

    Hello

    $("#f30>option").each(function() {
      console.log(this.value);
    });
    
  • Select list THAT LOV based on the selection of the Parent list


    Hello

    I'm pretty new to APEX and which seems to be a pretty basic question, but I don't know how to do it.

    So, I have two items in the selection list on my page and I need to dynamically change LOV in the second list based on the value of one of the parents.

    I think this question been here before, so could someone just tell me the answer?

    Thank you very much

    Leo.

    Leo_Y wrote:

    I'm pretty new to APEX and which seems to be a pretty basic question, but I don't know how to do it.

    So, I have two items in the selection list on my page and I need to dynamically change LOV in the second list based on the value of one of the parents.

    I think this question been here before, so could someone just tell me the answer?

    To get the right answer, you must ask the right question.

    Integrated support in cascade LOV is addressed in the documentation.

  • Refresh the report area of PL/SQL (not Page) using the value of the select list

    Hello

    I have a report region based on a "body of the PL/SQL function returning a query'which SQL is generated on the selection of a value of an element from the selection list, select action list is"Redirect and set", but this causes the entire page refresh rather than just the region report." I tried to update the report using only a dynamic action on the item list select (Action now reset to 'None'), but now the report does not appear on the choice of the list. Can someone suggest a solution that will allow me to update this report without refreshing the page? I use APEX 4.2.2 and the syntax of the statement is as follows:

    DECLARE

    v_statement VARCHAR2 (500);

    BEGIN

    SELECT query_text
    IN v_statement
    OF sql_queries
    WHERE query_id =: P2_QUERY;

    RETURN v_statement;

    END;

    where P2_QUERY is Select list item,

    Kind regards

    Kevin.

    KevinFitz wrote:

    The displayed report region is subordinate to the point P2_QUERY is NOT NULL. I guess that the region appears not is because the Action for the select list item is set to None, and so P2_QUERY is always NULL.

    No, the region does not appear because it is subordinated to the P2_QUERY being NOT NULL. This means that the region of report never exists on the page displayed in the browser, so it cannot be updated dynamically. (Dynamic updating is not to evaluate the conditions of the region, and she makes only the content of the report, not the whole region again).

    Remove the condition on the region to report, check the update works and then go back on what exactly are the requirements here. If you want to the area appear only when P2_QUERY has a value, and you want it to be regenerated without submitting and reposting of the page, the region must then be hidden rather than conditionally restored and shown via dynamic when action P2_QUERY Gets a value.

    I tried to add a further Action for the event real value DA but has been a mistake, as stated above,

    All irrelevant if Page to submit items on the region is used correctly.

Maybe you are looking for

  • The docking station uses Henge drivers?

    Is the Henge dock just a cable Organizer? -Seems all that is material. Or I need specific SOFTWARE drivers so that my Henge Dock to exploit 100% as expected? I use the Version B Henge Dock for my MacBook Pro 17-inch - and it all works when it is plug

  • The best mod for NB550D/02F news feed

    Hey fans of Mini Toshy,. There is no solid FULL only post on the net about how far you can push actully this material from end to end.In this post and other assignments YOU... I have a thread of a single window for geeks on this unit. The 32 bit Wind

  • iMac (24 inch, early 2009) freezes and then thaws

    iMac (24 inch, early 2009), frequency of 2.66 Ghz Intel Core 2 Dup, NVIDIA GeForce 9400 256 MB - no reason apparent other than a mouse click randomly, the computer freezes for anything between a few minutes and maybe 15-20 minutes.  Then, he thaws an

  • How to create the TCP non-blocking server?

    Hello I would like to have a TCP server at my request.  It will go about their business as usual, but in the background a TCP server sits waiting for a client connection.  If such a link exists, the normal code will send stuff on this topic otherwise

  • Error: reinstall the system 16?

    Hi guys,.I just put another hard drive in my MacBook and had to reinstall the system to the new drive (SSD).All applications are still on the old drive hard and Adobe Creative Suite displays error: 16 every time I try to open an application.Have you