Conditional display in textbox based on calculated value

Hello,
I have radio buttons that each have a numeric value. For example A=1 B=2 C=0. In the example below, the total equals 5.
The sum is displayed at the bottom of the document and is passed to another text box:
Instead of "5" being displayed in the text box on the right, it needs to display a word "Mastery" like this:
The word displayed is based on the totals via this range:
1 to 2 = "Acquiring"
3 to 4 = "Practicing"
5 to 6 = "Mastery"
The script I used to pass the value from the left to the right text box in the graphic above is:
// name for the text box field;
var cTextBox = "Firm-Wide Talent Strategy Knowledge - Totals";
// get the value of the field with the name in cTextBox;
var sTextBox = this.getField(cTextBox).value;
// set the value of this field;
event.value = sTextBox;
What would I need to add to this script to display one of the words, such as "Mastery" above?
I'm a complete neophyte to scripting. I found the script above online and somehow got it to work.
Thank you all very much for any help or pointers you can provide.
Best Regards,
Chris

Hi try67,
Thank you so much for your help. Your code has brought me one step closer, I would never have gotten even this far without it!
Initially, it was giving me and error, so I added a ")" and now it does display "Mastery", but I cannot get it to display the other two ("Acquiring" and "Practicing"), it just displays a blank space but does not give me an error.  I tried to fix it on my own by searching for some help, so I found and started playing around with jsbeautifier.org and JSLint. However, since I really don't know much about coding or syntax I hope these were not harmful. So now the code looks like this:
// name for the text box field;
var cTextBox = "Firm-Wide Talent Strategy Knowledge - Totals";
// get the value of the field with the name in cTextBox;
var sTextBox = +this.getField(cTextBox).value;
if (sTextBox >= 1 && sTextBox <= 2) {
    event.value = "Acquiring";
if (sTextBox >= 3 && sTextBox <= 4) {
    event.value = "Practicing";
if (sTextBox >= 5 && sTextBox <= 6) {
    event.value = "Mastery";
} else {
    event.value = "";
Do you know what I might be missing that prevents "Acquiring" and "Practicing" from displaying? 
Thank you so much again for your help,
Chris

Similar Messages

  • How to conditional display Report Region based on number of rows returned

    I have a page with two Report Regions.
    One Region should display if the Query returns 0-1000 rows. The other should display if the same Query returns more than 1000 rows.
    The only way I can figure out how to do this is have ANOTHER query in the conditions field for each Region to Select count(*) from etc.
    I know there is a #TOTAL_ROWS# value but that is only available after the Region is displayed. Is there some other built-in variable that can be used to put in the Conditions field or is doing duplicate SQL queries the only way?
    Any help would be appreciated.

    Rather than running your query 4 times (by embedding it in your condition), you can have a region that is not displayed, with a hidden item, and set the value of the item in a before header computation to the count of your query. Now you can conditionally display based upon the value of that item.
    -- Sharon

  • Passing DB values to the textbox based on Select Value item

    Hi,
    I am very much new to the Oracle APEX. In my project, I have a requirement wherein I have to pass the different values to the corresponding textboxes on a different page based on the value I select from the "Select Value" item.
    I have tried using calling On-Demand Processes, but couldn't get the desired result.
    Please suggest!

    Hi 796444 ,
    Welcome to the forum. It will be good if you familiarize yourself with the forum ettiquittes. Also, when posting always state the following:
    a. Apex version
    b. DB version
    c. Web server ; EPG, apexlistener, etc
    d. Provide adequate details for others to understand your problem / what you are trying to achieve.
    e. Any code snippets you post should be enclosed in a pair of tags
    If your current problem is that the you are *calling* Page 2 from Page 1, and while doing so you want the value of P1_ITEM1 to be passed and set in p2_ITEM1 then
    a. Edit the branch
    b. In Action in Set these items write P2_ITEM1
    c. In With these values write &P1_ITEM1. (do not miss the dot at the end)
    It looks good if you use a better handle than 796444 :-)
    Regards,                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Conditional display of parameter based on another in a concurrent program

    I've a concurrent program with two parameters
    (PARAM1) STATUS ->
    Value set = NN_STATUS BASED ON TABLE NN_STATUS_LKP
    DEFAULT VALUE :SELECT LOOKUP_CODE FROM NN_STATUS_LKP WHERE LOOKUP_CODE IN ('REQUIRED','REJECTED')
    (PARAM2) NOTE -> Valueset 240 Characters
    I want second parameter to be displayed only if first parameter value is REQUIRED
    I searched this forum and I tried $FLEX$ with no luck?
    Thanks,
    Kiran

    Hi Sandeep,
    In my scenario,
    first parameter is based on Table But second parameter is based on standard value set i.e 100 characters . No table is involved.How to make second parameter depend on first?
    Thanks,
    Kiran

  • Editing a textbox with a calculated value?

    I am just wondering if there is a way for the user to edit a textbox that has been populated by a calculated value. I have a textbox (Score) that sums up the numerical answers provided by the user to a set of questions. If they leave a question blank, the score should not be calculated. Is there a way to do this, or at the very least, change the answer in the Score textbox? Right now when I try to change the answer in the Score textbox, it reverts back to the calculated answer.

    =INDIRECT(ROMAN(MONTH(TODAY()))&"::B2")
    I don't know what problem you are having with table names that use regular digits. If your table was named "3" instead of "III", the formula would be:
    =INDIRECT(MONTH(TODAY())&"::B2")  which, on the day ofthis post, corresponds to 3::B2

  • Conditionally displaying a portlet based on parameter?

    Hi, I've been looking for a way to show or hide on a page a portlet (the standard Oracle search one, but it could be anything else) depending on whether a parameter is set to 0 or 1. So far the only "solution" I've found is to instead have two copies of the page, one with and one without the portlet in question, but obviously this scales very badly and is a bad idea from a maintenance POV.
    Is there a clean way to do something like this?
    Thanks,
    Cedric

    Yes, You can do it .. but it is little tricky. We have done something like this.
    First, you may know that all portlets are rendered by PPE , so we can not pass parameters to PPE to display particular portlets based on parameter.
    Instead, with in that Portlet, If the parameter is "N" then don't display any HTML from that portlet. Hope you know How to Pass page parameters to Portlets.
    Other way to implement this is by Portal Groups and granting access to those portlets,
    Still , if you are not convinced you can have a look at Portlet SecurityManager Class..
    Thanks
    Shan

  • Report display in dashboard based on selected value

    Hi Experts,
    I have an requirement.
    when I select quaterly in prompt the quaterly report should display.
    when Yearly selected then  yearly report should display in dashboard
    we are using OBIEE 11.1.1.7
    Any idea pls.

    Hi,
        I feel you can achieve this by using OBIEE11g Conditions. You can show the quaterly or yearly report based on the Rowcount fetched on the conditional analyis created. Please see if this helps

  • Conditional display of headings based on drill-down page or section shown

    <div>Crystal Reports 10</div><div>I have a report (originally written by someone else) with 1 drill down page.</div><div>The drill down shows section group footer 2.</div><div>I am adding a new drill down from the 1st drill down. This will show the details section.</div><div>There are headings which are displayed in the page header section.</div><div>I would like to suppress or hide these headings when the 2nd drill down page (details section) is shown.</div><div>I figured I could do it based on whether a section, or a field within a section, is displayed on the page or not.</div><div>How to accomplish this?</div>

    Thanks for asking this question.Â
    There is a formatting function (under the Document Properties group of functions) called GroupLevel(). It returns what level of group you're on. You can use this along with the Suppress conditional format to show/hide a section based on where the user is located. Â
    This would be a great one to "show" as a sample. I'll add it to my task list for submissions up here.Â
    Again, thanks for asking the question and start the ball rolling!
    Â Â Â Â Â - Kathryn Webster (Report Design Specialist)

  • Conditionally Formatting One Column Based On The Value of Another Column

    I have the following requirement:
    I have 2 columns in a report showing Actual Sales & Budget Sales each year. I am using a bar chart to show the different values for these 2 columns.
    I need to conditionally format the column "Actual Sales" so that if it is less than the "Budget Sales" it will appear in red, and green if "Actual Sales" is greater than "Budget Sales." So in a nutshell,
    CASE WHEN "Actual Sales" < "Budget Sales" THEN
    RED
    ELSE
    GREEN
    END
    Thoughts anyone?

    CASE WHEN (COL1 - COL2) < 0 then Red else Green end
    regards
    John
    http://obiee101.blogspot.com

  • Conditionally display button based on number of rows in rpt query results?

    I know that I can conditionally display a button based on the number of rows returned in a query entered in the condition. However, I have a report region button that I only want to display if any data was returned by a report query. Since I've already executed the query to generate the report, I do not want to execute it again to determine whether any rows were returned. Is there any way to detect whether any rows were returned for a report other than to reissue the query?

    http://htmldb.oracle.com/pls/otn/f?p=24317:52
    OK, so it looks like it contains the rowcount of the report region rendered just before the variable (apex_application.g_flow_total_row_count) is referenced.
    Sort of like how SQL%ROWCOUNT contains the no. of records affected by the last SQL DML statement.
    Note that the pagination scheme affects the result. In the example above, the 2nd report region is showing 10 rows with a 'Rows X to Y' pagination scheme. So g_flow_total_row_count=11 because I guess the reporting engine has to fetch the 11th row (and discard it) to determine whether to render the 'Next' pagination link.
    If you select a pagination scheme that forces the reporting engine to fetch all the rows 'Rows X to Y of Z', g_flow_total_row_count will always be Z, not the number of rows actually rendered on the screen.
    Thanks

  • Conditional display in Reports

    Hi,
    Does anyone know of a way to make a icon used to implement a link to another page appear for some rows of a report but not others? The condition for display could be based on the value of one of the columns in the report.
    Niall

    Right now, you have to put your logic into your SQL for the report. You can use CASE or DECODE to determine what should (or should not) be displayed for a given column.

  • Setting the Link Group Name in  Deep Link based on the value of a column

    Using Jdeveloper 11g, Jheadstart 11g
    Is it possible to override the link group name in deep linking. For example can I conditionally set that field based on the value of the item.
    Regards
    Edited by: aliegeh on Jul 25, 2010 8:35 AM
    Edited by: aliegeh on Jul 25, 2010 8:43 AM

    Thanks for the suggestion.
    Here is what I am trying to do:
    I have a table with one visible column that has the following entries:
    1. Create
    2. Modify
    3. Verify
    4. Approve
    5. View
    If the user clicks on row 1 (Create) then the link group name should be "CreateEmployees" to create new employees
    If the user clicks on row 3 (Verify) then the link group name should be "MaintainEmployees" for verification and so on.
    (This is role based and each role will have access to one or more of the rows in the tabler)
    It basically mimics a work-flow type of scenario.
    I tried to modify the template and looked at the line:
    action="$JHS.facesConfigGenerator.addItemGroupLinkTaskFlowCall((${JHS.Current.item})}" but got stuck there.
    Is there a way to change "JSH.current.item" in the template to read the group link name from another column say by using #if statements.
    One way I also tried was to introduce a column for each action such as CreateAction, VerifyAction etc which kind of agrees with your suggestion but the drawback is the need to modify the table if another task is required.
    Regards
    Edited by: aliegeh on Jul 25, 2010 8:36 AM
    Edited by: aliegeh on Jul 25, 2010 8:42 AM

  • Receiver Determination, condition to select receiver doesn't extract values

    Dear all!
    I have SAP PI 7.1
    I am facing problem in Receiver Determination while using Condition to select receiver based on the values in the payload.
    I need, if Identificador = 1 then receiver BC_1 and if Identificador = 2 then the receiver BC_2
    My payload has the value:
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:p1="http://pruebas.endesa.es/AME4S_2">
      <soap:Body>
        <p1:MT_WS_SENDER_Q>
          <IDENTIFICADOR>1</IDENTIFICADOR>
          <OBJECT_ID>7600000009</OBJECT_ID>
        </p1:MT_WS_SENDER_Q>
      </soap:Body>
    </soap:Envelope>
    But, the trace shows following:
    <Trace level="2" type="T">......extracting (new) for Extractor: XP /p1:MT_WS_SENDER_Q/IDENTIFICADOR </Trace>
    <Trace level="2" type="T">......extracting values found: 0 </Trace>
    I tried with double quotes, simple quotes, without quotes...
    I tried too with a Receiver Rule (with context) and local rule with xpath....
    Can someone please advise?
    Thanks in advanced!!

    Hello,
    /p1:MT_WS_SENDER_Q/IDENTIFICADOR = 1
    Can you try //p1:MT_WS_SENDER_Q/IDENTIFICADOR = 1 ? I'm sure I read it somewhere here in SDN regarding the xPath difference for stateless and stateless XI 3.0 compatible version is an additional /. It's worth to try
    Hope this helps,
    Mark

  • MAKE BUTTON CONDITIONAL DISPLAY IN A REPORT BASED ON STATUS OF COL VALUE

    hello,
    can anyone help me out with this issue.
    Like I have a normal SQL report with buttons update,delete,insert and I wanted to display these buttons conditionally based on the value of the "status" column.
    For Example: if the status columnvalue is 'DEV' then only display the buttons otherwise don't display them.
    thanks,
    Orton

    I would use a CASE statement in the select....
    each CASE would be an img src tag for a different button if the button is an image.
    does that make sense? I can include an example if you would like...

  • Conditional Display Based on a Field Value

    I'm a newbie ...
    I developed an application that shows payment information.
    Record type one is a cheque
    Record type two is a payment stub
    Rec Type Account Amount PDFFile
    1 888888 1234.00 summary.pdf
    2 888888 10.00
    2 888888 400.00
    2 888888 800.00
    2 888888 24.00
    I have developed a program that assimilates a number of cheque images into a single pdf file. I write the filename and location of that pdf file into a field on 'record type one' (cheque record).
    I want to have a button that only renders on records that that have a value in this field.
    I've looked at conditional display, but can't seem to find the right option.
    Can anyone get me pointed in the right direction?
    Thanks
    Dave

    Dave - Where do you "write" this field? On the same page or from a previous page? What is the display type of this field (which I hope is implemented as an Application Express page item)?
    It's all about having a value in session state for that page item at the time your button is rendered. If you've got that, then the button condition will be trivial.
    Scott

Maybe you are looking for

  • How to get mouse properties from Graphs/Charts?

    Hello, My problem is the following: I have a graph that displays some data and two cursors. Next to it is a button that allows users to select whether they want to see all data, or a selection based on the cursors. When in the selection mode, the cur

  • Ical week numbers and heat map missing in preferences

    Hi, This page describes that you can turn on/off the heat map and week numbers: http://www.controlyourmac.com/2012/02/10-amazing-features-of-ical-5-on-os-x.html I migrated from 10.6 to 10.7.4 and wonder where these checkboxes are. So, the configurati

  • Linking two fields in a dictionary view to the same field

    My DBA asked me if I knew how to do this without resorting to ABAP code, and I said I'd ask you guys over here. A customer wants a view on several tables.  Vendor name from LFA1 is one of the columns in the view. He has two other columns in the view

  • Install problem

    Hello SAP-Gurus, I have a Pack of SAP CD's to practice at home SolMan 3.2 e MS SQL. So I have some problems now. I have installed Central Instance, Database Instance and Dialog Instance. I have this problem: the dispacer's icon doesnt'n became green.

  • RM-900 and Windows Media Cen

    Can I use the old remote-control RM-900 (came with Audigy Platinum) as a remote-control for Windows Media Center?