Coloring  a popup field in a tabular form

Hello all,
i have searched for this subject many times, find a lot of answers to coloring at all, but none of them works for me.
I have a tabular form,in the sql query i create a column COLOR (case clause) and try to color the back-/foreground of the column (Popup LOV:named LOV) and use this in 'tabular form element->element attributes':
style="background-color:#COLOR#"
or
class="lov" style="background-color:#COLOR#"
but it does not work.
How could this be achieved ?
Wolfgang

Hi Wolfgang,
You may have to use the HTMLDB_ITEM.TEXT functionality to do that.
For example:
HTMLDB_ITEM.TEXT(11, MGR, 10, 10, 'STYLE="COLOR:RED; BACKGROUND-COLOR:YELLOW"') "Manager"
will create a column on the form with all items in red text on a yellow background. Your CASE statement would then need to determine the entire entry:
CASE WHEN X = 1 THEN
HTMLDB_ITEM.TEXT(11, MGR, 10, 10, 'STYLE="COLOR:RED; BACKGROUND-COLOR:YELLOW"')
ELSE
HTMLDB_ITEM.TEXT(11, MGR, 10, 10, 'STYLE="COLOR:BLUE; BACKGROUND-COLOR:WHITE"')
END "Manager"
Have a look at the following for details about using HTMLDB_ITEM functions:
http://download.oracle.com/docs/cd/B28359_01/appdev.111/b32258/api.htm#BGBHDGAI
Andy

Similar Messages

  • Unable to pass a parameter to a field in a tabular form.

    I created a tabular form with 2.0 using the wizard. I’m having issues though with 2 of my columns.
    The two columns are last_edit_user and last_edit_date. As you can tell I’m trying to pass the system date and :app_user to these two fields.
    I read this thread Default Value in Tabular Form and decided to create a simple function on the database that returns the system date. Then under report attributes I went to the last_edit_date column. In “Tabular Form Element” I changed it to “Display as Text (saves state)” made the default type a PL/SQL expression or function then put the function name in the ‘default’ text field.
    When I try to update a field I then get:
    Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-01407: cannot update
    I have also tried creating a computation and passing the date to a hidden item then use default type item and list the hidden item in the default text box. I get the same error.
    Considering how often these fields or similar would come up in a tabular form I can’t help but think there must be an easy way of passing parameters to fields in a tabular form without making them editable.
    Message was edited by:
    [email protected]

    This keeps coming up often and I find that the easiest way to handle this is in a row-level trigger on the underlying table
    create or replace trigger t
    before insert or update on mytable
    for each row
    begin
    :new.last_update_date := sysdate;
    :new.last_update_user := nvl(v('APP_USER'),user);
    end;
    /

  • Calculated non-base table field in a tabular form

    I am struggling with creating a non-base table calculated field in a tabular form in ApEx 3.1
    Can you point me in the right direction
    I thought this would be fairly easy to do, but I cant work out how to do it
    Requirements
    1) Tabular Form based on a table with QTY and PRICE columns
    2) TOTAL is a non-base table field, based on QTY * PRICE
    3) If the Qty or Price changes, the TOTAL should be re-calculated
    Example
    QTY   PRICE  TOTAL
    ===    =====  =====
    3       5          15
    10      50         500
    20      3           60
    Environment
    ApEx 3.1, Oracle 10 and Oracle 11 databases
    I recommended to upgrade to a newer version of ApEx but the request was rejected so Im stuck with 3.1

    Thanks, but its not the solution that I am after
    I am looking for a solution that will ...
           1) not require the calculated value TOTAL to be stored in the table
    and 2) re-calculate the TOTAL when I modify the dependent values (QTY and PRICE) before I save the changes to the database
    I am still looking for a solution if anyone can help

  • Help- I have added a field in my tabular form and now i get an error in mul

    Help- I have added a field in my tabular form and now i get an error in muli update form; Here is the error, how do I go in to change the process, adding the extra field??
    Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-20001: ORA-20001: Current version of data in database has changed since user initiated update process. current checksum = "F10F6D7EC4CF938382C6DC2EE22800F6", item checksum = "90E47F32E95B71B7A9D47A1311063445"., update "CAPRS"."CONTRACT_ERRORS" set "ID" = :b1, "CONTR_NUM" = :b2, "REPT_MONTH_CD" = :b3, "REPT_FISCAL_YEAR" = :b4, "REPORT_FAC_CAGE_CD" = :b5, "END_ITEM_NUM" = :b6, "END_ITEM_DESC" = :b7, "WSSC" = :b8, "WBS_CD" = :b9, "WPC_CD" = :b10, "CONTR_CLIN" = :b11, "CO
         Error      Unable to process update.

    Hi,
    I believe the error is due to the checksum process which doesn't have that additinoal field's information. You can try creating the form again with the additional field, or if needed you can go with the Manual tabular form.
    Thanks,
    Manish

  • Setting values for non-displayed fields on a Tabular Form

    I'm having a problem setting non-displayed fields on the same table as displayed fields like last_update_date, last_updated_by, id's and other fields when creating new records or updating existing records in a Tabular form.
    What is the best and easiest way to set these values without using database triggers?

    Hi Jes,
    I'm a little reluctant to use database triggers as I used this product a couple of years ago and I'm fairly sure I handled this problem in HTML DB without the use of triggers. I am therefore I'm getting a touch frustrated that I can't remember how to do it now !!
    Do you know of any way of setting values for non-displayed fields on a Tabular Form without using database triggers?
    Also, you seem to be suggesting that database triggers is the best way to do this?
    Thanks

  • A sticky problem updating fields on a tabular form

    I have an application where I'm trying to match skillset supply to skillset demand. We have resources and we have work for resources to do. Resources possess a set of skills. Work requires a set of skills. Skillsets are described by three fields: Domain, Target, Skill. So, we are able to capture the supply of skills in a table:
    RSRC_ID (FK to Resource table)
    DOMAIN
    TARGET
    SKILL
    PROFICIENCY  (this is the skill level 1 to 5)The relationship of resources to skill supply is 1 to many. Conversely, work demands skills, and so we capture skill demand in a table:
    WORK_ID (FK to Work table)
    DOMAIN
    TARGET
    SKILLThe relationship of work to skill demand is 1 to many also.
    Users assign skills to resources using a master-detail form. It works fine
    Users assign skills needed to work also using a master-detail form, and it works fine as well
    A view then joins the skillset supply to skillset demand so that assignments can be made only where supply and demand match. This view is used in the LOV below.
    The problem I have is that I am using a mapping table to capture assignments of work to resources or resources to work. It is a many to many mapping of work and resources with matching skillsets, and it looks like this:
    RSRC_ID  
    WORK_ID
    DOMAIN   (
    TARGET   ( These are the skillsets where demand equals supply and are derived from the view and presented in the LOV )
    SKILL      (I've created master-detail forms for the two types of assignments. An LOV in the detail form will present qualified resources or eligible work and then return the appropriate RSRC_ID or WORK_ID, but I must also populate the other three fields (DOMAIN, TARGET and SKILL) before I can insert or update the record. Here's the LOV from the form where resources are assigned to work:
    SELECT sed.domain||'.'||
           sed.target||'.'||
           sed.skill||'/'||
           sed.skill_prof||'  '||
           r.first_name||' '||
           r.last_name "d",
           r.rsrc_id "r"
    FROM   ri_resource r, ri_skill_supply_eq_demand sed
    WHERE  r.rsrc_id = sed.rsrc_id
    AND    sed.work_id = :P18_WORK_ID
    order by 1It is not enough to just match the work to the resource, we must record for what skillset they are matched. I can't seem to see an easy way to populate the three other fields in the tabular form using data that I can retrieve with the LOV.
    I am using APEX 4.1. Any help is appreciated.

    Hi Dan,
    Please could you replicate your problem on apex.oracle.com and share some developer credentials with us? It will be easier to demonstrate how this would be achievable.
    For this specific problem, you will need to re-create all your relevant DB objects and populate them with some sample data.
    Kind Regards, Pete

  • Date popup validation in manual tabular form

    Hey all-
    I'm creating a tabular form manually (i.e., with apex_collection) per instructions at OBE (http://www.oracle.com/technology/products/database/application_express/ppt/odtug2008_marcie_young.pdf). Working fine, except I'm having a problem with apex_item.date_popup.
    One of the fields I need to collect from the tabular form is a date. For the SQL report, the relevant item is apex_item.date_popup(9, null, c008, 'YYYY-MM-DD', 20, 10) (and c008 is the relevant column from the collection). The trouble comes in if a user types a bogus date into the date popup. I have validation code to check this, but before running that code, I have to store the user's new entries into the collection. So basically my steps are:
    1. display the tabular form w/ a SQL report containing apex_item.date_popup
    2. use an update collection PL/SQL process to store the user data into the collection (process point = On Submit and Before Computation)
    3. use a validation PL/SQL process to verify the data in the collection before processing the update
    All that works, and the validation identifies the bad date. But then the page tries to render the tabular form again (so the user can fix the bad date), but the apex_item.date_popup(9, null, c008, 'YYYY-MM-DD', 20, 10) column fails b/c of the bad date. I need a way to programmatically create a date popup and populate it with (potentially) invalid data. Any ideas?
    Thanks
    Rob

    Problem solved. Tossed the lackluster apex_item.date_popup and replaced w/ jQuery datepicker.
    Rob

  • How to change postion of the field in a tabular form

    Hello Gurus,
    My Table is like .Please ignore dots they have been placed just for better readability
    Year.....product....w1_dt..........w1_qty....w2_dt..........w2_qty.....w3_dt...........w3_qty......w4_dt...........w4_qty
    2010....1.............4-jan-2010....1............11-jan-2010....2.............18-jan-2010.....3.............25-jan-2010....4
    2010....2.............4-jan-2010....4............11-jan-2010....5.............18-jan-2010.....7.............25-jan-2010....8
    I have to make a tabular form for updation only, the tabular form should look like this
    year......product......w1.................w2.................w3..................w4
    2010.....1..............4-jan-2010.......11-jan-2010.....18-jan-2010.....25-jan-2010........-----dates can't be eddited
    ............................1....................2....................3...................4.......................-----this is qty column user will update this qty column
    2010.....1..............4-jan-2010.......11-jan-2010.....18-jan-2010.....25-jan-2010........
    ............................4....................5....................7...................8......................
    Please tell how could I make date field to come over qty field
    Regards
    Shashi
    Edited by: user4285062 on Jul 22, 2010 1:03 AM
    Edited by: user4285062 on Jul 22, 2010 1:10 AM
    Edited by: user4285062 on Jul 22, 2010 1:12 AM

    Hi,
    For your scenario, you need to have two cellVariant as TableStandardCell (say successTSC & failTSC). Add tableCellEditors to these 2 TableStandardCell as you like. Mark there variantKey property as var1 & var2 respectively.
    Do change the cellDesign as you like the color for the TableStandardCell.
    Bind an attribute selectedVariant to your column selectedCellVariant property.
    Now in wdDoModify you can write:
    for(int i=0;i<wdContext.nodeCountries().size();i++){
    if(wdContext.nodeCountries().getCountriesElementAt(i).getStatus().equals("SUCC")){
    // Here node countries is the datasource of your table.
    wdContext.nodeCountries().getCountriesElementAt(i).setVariantKey("var1");
    } else if(wdContext.nodeCountries().getCountriesElementAt(i).getStatus().equals("FAIL")){
    wdContext.nodeCountries().getCountriesElementAt(i).setVariantKey("var2");
    The article below will definetly help you in your requirement.
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c0310fd2-f40d-2a10-b288-bcbe0810a961]
    Hope this will surely solve your problem.
    thanks & regards,
    Manoj

  • Coloring the changed values  in a tabular form

    Hi,
    I have a tabular form (Sql query updatable report) which displays the data from table1, in this I need to color code the fields whose value is different from a similar column in table2. In simple how can I add color tag in the sql query. I tried using the below
    select <&ltdiv style="background:red;color:red">||LAST_NAME||<&lt/div> LAST_NAME, first_name from table1
    but it sets the div tag part as LAST_NAME input field's value.
    Any suggestions please ?
    Thanks,
    Pourush
    Edited by: Pourush Gopal on Apr 1, 2009 10:41 AM
    Edited by: Pourush Gopal on Apr 1, 2009 10:41 AM
    Edited by: Pourush Gopal on Apr 1, 2009 10:41 AM

    Try this (with quotes around the div tags):
    select '&lt;div style="background:red;color:red">'||LAST_NAME||'&lt;/div>' LAST_NAME, first_name from table1

  • Sum the values of a text field in a tabular form using JavaScript

    Hi Folks.
    OK, I put my hands up. I don't know Java script but I'm picking up the basics and I WANT to learn.
    Here's my situation.
    I have a tabular form which has lots of Standard Report Columns and ONE text field.
    I want to sum the values entered in the text field, real time, using Java Script without the need to have a round trip to the database.
    I'm guessing this will involve some kind of loop. Once I have that SUM figure I will store it in a hidden item and it will be used for validation when the user submits the form.
    If anyone can give me a simple Java Script to do this, or point me in the direction of one, I'd be very grateful.
    Many thanks.
    Dogfighter.

    Hi Arie.
    Thanks for the link.
    That's a great start,
    What I've got working so far is the following...
    <script type="text/javascript">
    function f_calculate_delta(p_this,p_rownum)
    var amt = $x(p_this).value;
    alert (amt);
    var display_item_to_set = 'f08_'+ p_rownum
    $x(display_item_to_set).innerHTML = amt
    </script>
    This is working fine.
    Where I'm stuck at the moment is how I can 'get' the value of another cell in the same row. They have all been set up using the APEX_ITEM API with their own unique IDs.
    I will continue looking but if you could give me a steer, that would be great.
    Many thanks
    Simon
    PS. APEX 3.1
    PPS. Trying to get the value of another row using...
    var display_item_to_get = 'f04_'+ p_rownum
    var expected_amt = $x(display_item_to_get).value
    PPPS. Also tried...
    var display_item_to_get = 'f04_'+ p_rownum
    var expected_amt = $v(display_item_to_get)
    and
    var display_item_to_get = 'f04_'+ p_rownum
    var expected_amt = $v(display_item_to_get).value
    None of which are working at the moment.
    Message was edited by:
    Dogfighter

  • As in phrase WHERE to address to field of the tabular form?

    I have generated the master tabular form.
    What realize in her set hung list box?
    When add in request design:
    WHERE SYSTEM_ID = :S_DEMSYSTEM_ID
    exhibit works untrue
    Also incomprehensibly, what do renovation hung by flap of the form
    In usual form such works beautifully.

    What to you it is not clear?
    In the tabulared form I should choose only from the contextual list of values

  • How to set the Background Color of a Text Field in a Tabular Report.

    Hello,
    I tried to set the Background Color of a Text Field in a Tabular Report.
    But I was not able to change this colur.
    In the report attributes --> column attributes
    I tried already:
    1. Column Formating -- >CSS Style (bgcolor: red)
    2. Tabular Form Element --> Element Attributes (bgcolor: red)
    but nothing worked.
    Can anybody help me?
    I Use Oracle Apex 2.2.1 on 10gR2
    thank you in advance.
    Oliver

    in "Report Attributes" select the column to move to the "Column Attributes" page. In the "Element Attributes" field under the "Tabular Form Element" region enter
    style="background-color:red;"
    I will also check if there is a way to do this via the template and post here again
    edit:
    in your template definition, above the template, enter the following:
    < STYLE TYPE="text/css" >
    .class INPUT {background-color:red;}
    < /STYLE >
    (remove the spaces after the < and before the >)
    change "class" to the class that the template is calling
    (I'm using theme 9, the table has: class="t9GCCReportsStyle1" so I would enter t9GCCReportsStyle1)
    A side-effect of using this second version is that ALL input types will have a red background color--checkboxes, input boxes, etc.
    Message was edited by:
    TheJosh

  • Link for field in tabular form

    Hi everyone,
    How can you create add a link (which opens a pop up screen) next to a field in a tabular form, in order to set the value in that field with the value
    selected in the pop up screen.
    I already know how to set the values.
    In the tabular form when you add a link, you see the id and row also. How can I remove that or is there another way to set the values.
    Thanks,
    Cleo

    I think you can accomplish what you want by changing the the field to update from text to a popup lov. You can do this by going into the report attributes of the tabular form and then clicking the pencil next to the field who needs the lookup values. Change the 'display as' box from text to popup lov and supply the values.
    You can also hide fields by going into the report attributes and unchecking Show.
    There is an overview of some concepts here http://download.oracle.com/docs/cd/E14373_01/appdev.32/e13363/frm_tabular.htm.
    Let me know if I'm not understanding your post correctly.

  • Popup window for tabular form row edition

    To edit existing or new rows in a tabular form (page 1), I would like to open a popup window (page 2) with fields mirroring original tabular form fields. So, some basic data can be viewed/typed in the tabular form and the whole of the record data are viewed/typed on a separate popup form.
    On opening popup, I pass a tabular form's current line number (filled with up to three zeros on the left).
    When the user clicks on OK button on popup page, data will be put to the corresponding tabular form row. That should allow me to get /set tab form data from popup using following syntax:
    opener.document.getElementById('f04_' + line).value
    However, when I call data-initialization javascript function on onload of the popup form, popup fields to be filled are not rendered yet. At which point (and how) could I call this javascript initialization function?
    Another question. With Firebug Inspector, I see that right in front of each tab form data tag, there is a "label" tag with the name of the column as it was defined in report attributes. As long as I have a information, opener.document.getElementById, what HTML/Javascript syntax should I use to get to this label tag?
    Igor

    OK, the first part of question is OK now. Simply, I was putting a javascript code calling my initialization predure in the HTML Body Attribute section of the page, instead of simply writing there: onload="initFunction();"
    The second one stands still: once I have a tabular form's element id like f20_0003, how can I get to the symbolic name, e.g., "FIRST_NAME", that is in the label tag in the same table cell?

  • Refer to Tabular Form field in Condition of Dynamic Action

    I tried to filter on this topic but didn't come up with anything.
    Is there a way to refer to a field in a tabular form as a condition of a dynamic action?
    For example, I want to pop up a message (javascript 'alert') when the value of one field in a tabular form is changed, but only if another field for that same row meets a certain condition.  So let's say the field in the condition is XYZ.  So in the condition section, i would have PL/SQL Expression - XYZ IS NULL.  Something like that.  How would I refer to that XYZ field from my tabular form in the condition section of a dynamic action?
    Thanks in advance.
    John

    Thanks for your help on this.  I think going with the action being an 'execute javascript code' is a good approach.  So here is my situation - I have a tabular form.  I have 2 fields (among others) - SPECIES and WEIGHT.  The SPECIES is a select list in the tabular form.  The WEIGHT is a text box in the tabular form.
    To make this simple, let's say this is for only one species - SNSG.  If the person changes the select list to SNSG and the associated WEIGHT field is NULL, I need to pop up a message that says 'Fill in weight field if selecting SNSG'.
    So here is what I have:
    Event: Change
    Selection Type: jQuery Selector
    jQuery Selector: :.speciesClass
    Condition: In List
    Value: SNSG
    True Action: Execute JavaScript Code
    ** Here is where I am stuck: In the JavaScript code I need to this:
    If WEIGHT is null THEN:
    confirm('Warning: Enter weight if entering SNSG species.');
    I am not sure how to write that "If WEIGHT is null THEN" part in javaScript and be able to refer to the WEIGHT field associated with the SPECIES value I just changed in the tabular form.
    I hope that makes sense!
    I appreciate your help!!
    Thanks,
    John

Maybe you are looking for

  • Print HTML thumbs? Possible?

    I have a number of CSS .html files that I would love to be able to print thumbnails of, say maybe 6-8 to a page, but I cannot find a way to do it. Does anyone have any thoughts? Please?

  • How do I put 2 IPODs on one computer using one user and the same ITunes

    I have a 40GB music IPOD and just got a 30GB video IPOD. How do I put both on my computer using the same ITunes program. My ITunes won't recognize the new 30GB model when I connected it.

  • Convert char to dec/amount

    Hi, I need to move the data(1,334.25) to a decimal field....(1334.25) If i move directly i am getting an exception. Can you let me know if there is any FM to convert the char to num without removing decina

  • Contacts app not finding names in Exchange 2010

    Contacts app not finding names in Exchange 2010 server This is weird, could be a bug in 10.8.2, not sure, want to see if anyone else is seeing this. Mountain Lion 10.8.2 Exchnage account created for: Mail, Contacts, Calendars. All looks good there. C

  • Freight Invoice tables and fields

    Plz any body can give the table names and field names of Freight Invoice informaion.