Conditional display in the text box based on the calculated value

Hello

I have radio buttons that each have a numerical value. For example = 1 A = 2 C = 0. In the example below, the total is equal to 5.
examplescreen01.gif

The sum is displayed at the bottom of the document and is passed to another text box:

examplescreen02.gif

Instead of '5' displayed in the text box on the right, it should display a "Control" Word like this:
examplescreen03.gif

The displayed word is based on the totals through this range:

1-2 = 'absorbing '.

3-4 = 'practitioner '.

5 to 6 = "control".

The script I used to pass the value from the left to the right text box in the chart above is:

name of the field to text box;

var cTextBox = 'Cabinet Talent strategy knowledge - total';

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;

That I need to add to this script to show one of the words, such as "control" above?

I am a complete novice to scripting. I found the above script online and somehow got it to work.

I thank very much for any help or pointers, you can provide.

Best regards

Chris

Sorry, there were some errors in the code that I provided above. Try this:

If (sTextBox > = 1 & sTextBox)<= 2)="">

Event.Value = "absorbing";

} ElseIf (sTextBox > = 3 & sTextBox)<= 4)="">

Event.Value = "practitioner";

} ElseIf (sTextBox > = 5 & sTextBox)<= 6)="">

Event.Value = "master";

} else {}

Event.Value = "";

}

If it still does not respond, you can send me the file at [email protected] and I'll check...

Tags: Acrobat

Similar Questions

  • Display of a text box based on a LOV

    Hello

    I have a form with a list of selection and want to display a text box when someone chooses another (value 5). When I use the selection list with redirect clears my entire form data, it will bring up the text bx. The text box has a conditional display of pl/sql: p2_orig_src_c = '5'. I don't want the form to submit from the selection list, because the user will not be performed of the incoming data in the form.


    I tried Dennis javascript and still not having a chance.


    < script language = "JavaScript" type = "text/javascript" >

    function SHOW_ON_ORIG_SRC_C_VALUE (pThis, PThat, pValue) {}
    var rv is $x (pThis) .value;.

    If (rv == pValue) {}
    html_ShowElement (pThat);
    } else {}
    html_HideElement (pThat) ;}
    }
    < /script >
    ----------------------------------
    Footer area:
    < script >
    SHOW_ON_ORIG_SRC_C_VALUE('P2_ORIG_SRC_C','P2_ORIG_SRC_NARR','5');
    < /script >

    -------------------------------
    Select the attributes of the list: (I probably put this in the wrong place)

    The HTML Form element attribute: onchange = "SHOW_ON_ORIG_SRC_C_VALUE ('P2_ORIG_SRC_C', 'P2_ORIG_SRC_NARR', ' 5');
    and for people with disabilities of the orig_src_narr conditional display


    All the tips are greatly appreciated.

    Thank you
    Mary

    Mary:

    If the second argument of the JS function is defined as "PThat", while your references to this argument in the code use "pThat?

    CITY

  • How to display only the total value in the upper part of the chart stacked

    Hi all

    I need to display only the total value at the top of the stacked chart in the report of obiee 11g. Can someone help me on this please.

    Thank you

    Hello

    Will be a little different approach suit you like the below a? Total for a day is displayed next to the attribute of the day. Here, the "daily amount" is also an attribute instead of a measure.

  • Select text in the text box based on user input?

    I need to select (highlight) text that is present in the users choice i.e SystemPrompt from TextArea is shown where the user enters the desired text and if this text is currently present in the text box, put it highlighted, otherwise display additional information. Something like the search feature in the standard Notepad application.

    I can't find what I'm looking for in a TextEditor.

    Text of the text box is available by using the text property.

    If you can access the text typed by the user and then the index can be easily calculated. Something like this (untested):

    QString textAreaText = textArea->text();
    QString userInput = ...;
    
    int startIndex = textAreaText.indexOf(userInput, 0, Qt::CaseInsensitive);
    int endIndex = startIndex + userInput.length();
    
  • Fill in a text box based on the list box selection?

    I'm relatively new to using scripts in forms.  So I hope that someone can help me here.

    I have a list box called 'Name', which uses the user selects a name.  I have a text box called "DOB", I need to be filled in automatically with the date of birth of the corresponding name that has been selected.

    I tried to adapt some scripts to fit my needs here, but nothing helps.  Although it seems like it should be pretty easy.  Any ideas?  Thanks in advance for the answers.

    ' 1. fill the list box with the name of "and place the date of birth in the option 'value exprot '.

    2. for action 'on blurr"add the following script:

    this.getField('DOB').value = event.value;

    When you tab or the mouse out of the list box, the value displayed in the field "DOB".

  • Interactive report, conditional display of the column binding

    Hello

    We have obligation to disable editing in case this field is 1 (1 = closed).

    Is it possible to disable it on interactive report.

    -case when status = 1 link in the column should be disabled (not visible) in order to prevent future changes on the payroll.

    SELECT payroll_no, status

    OF hr_payroll

    ORDER BY payroll_no DESC;

    I tried the link below, but it does not work in my case.

    http://nerd.NET.au/24-Apex-application-express/report-layout/92-conditionally-show-report-link-column-based-on-value-of-...

    Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production

    Request Express 4.2.2.00.11


    Thank you in advance,

    Best regards, FM

    Status of the INCIDENT WHEN 'ACTIVE' = then


    '
    OTHER END null deactivate_employee.

    Of

    EMPLOYEES

    What exactly is the error you get? What HTML is displayed in the HTML source code?

    Just by looking at it, I would say that you need to remove the "/" before the f? p

    Don't forget not this way could cause problems if you start using the checksum, then you might want to look at the use of APEX_UTIL. PREPARE_URL to create your URL.

  • Please help a poor beginner to open a text box based on a drop-down list

    Hello world

    I am quite new to the life cycle and my experience isn't in the lineup, so I hope that you will be kind to me. I designed a form that we use to send to our Bank to hire contractors. I need to make a text field become visible collection of some inscriptions on the drop-down list. for example, if an entry in the drop-down list "Holiday", I need another text field become visible to the user of maunally enter an extension number. If the user selects, say, "Study leave", I need the text box to stay invisible to the user.

    I hope this makes sense.

    Thank you guys & Gal

    Heavy E

    It is a java script placed on the drop-down list on the change event;

    If (xfa.event.newText is "Vacancy")
    TextField1.presence = "visible";

    else TextField1.presence = "hidden";

    Field1 text is defined as hidden

    To answer your second example, add in the same field:

    If (xfa.event.newText is ' Study/leave')
    TextField1.presence = "hidden";

    If it's confusing, let know us

  • Conditional display of the DataGrids

    Hello

    I use Cairngorm architecture in my application. My application analyzes an XML file and generates the datagrids based on tags in the XML file (No. tags in XML may vary). The application has views different (mxml files) that contain different datagrids corresponding to different tags.

    I have binded "visible property" of those datagrids to the logical XML for analysis document that is if the tag is found in the XML file and then set the visible property of the datagrid true, otherwise set it as false.

    The logic above works fine except that it leaves empty displayed between the two datagrids (for the invisible datagrids that correspond to the missing tags in the XML file).

    Can someone suggest me a better way to handle this scenario?

    Thank you
    sentiboy

    In addition to the visible set to false, do not forget also affect includeInLayout false, so invisible DataGrid is not considered in the layout.

  • Change ' display as ' type text box with radio button

    Hello

    I have a field on a form html clob. I have the default ' display as ' the value "Textarea with spell checker... I created a radio button with 2 values:

    Edit
    Overview HTML

    Is it possible to change the "display as" to "with the HTML Textarea editor' to switch between the radio button options? Any help would be appreciated I am running 3.1.2.00.02

    Thank you

    You could

    (1) call textarea_1 'Textarea with spell checker.
    (2) define as «Textarea with HTML editor» textarea_2
    (3) use javascript to show or hide one of them according to the radio button

    CITY

  • Need help on javascript for autofill boxes based on a numeric value.

    I have a numeric field that I would have 1 - box

    five autofilled based on a numeric value.

    For example, the numeric value is TotalPoints

    If the value of TotalPoints is > 10 fill this box

    If the value of TotalPoints is 10-19 autofill this checkbox

    If the value of TotalPoints is 20-49 autofill this checkbox

    If the value of TotalPoints is 50 to 69 autofill this checkbox

    If the value of TotalPoints is 70 + fill this box

    Help in writing the correct script for this would be greatly appreciated.

    The following script works for me. Notice the addition of the declaration of resetForm, I would have understood before.

    Custom text field validation script
    (function () {}

    Get the value of this field as a number
    var val = + event.value;

    resetForm (["AssetClass"]);

    If (val > = 70) {}
    getField("AssetClass.0").value = 1;
    return;
    }

    If (val > = 50) {}
    getField("AssetClass.1").value = 2;
    return;
    }

    If (val > = 20) {}
    getField("AssetClass.2").value = 3;
    return;
    }

    If (val > = 10) {}
    getField("AssetClass.3").value = 4;
    return;
    }

    //<>
    getField("AssetClass.4").value = 5;

    })();

    Edit: Yes, place the code in the text field Validate event is correct.

  • Insertion of the calculated values and values into a new table. How?

    Hi guys. Had a slight dilemma here. My problem is that:

    1. I have an average of two values (in the same column) for the 2 different lines (which is 7 days before the event and the other which is 14 days). I need to insert a new table

    WITH

    2. the data in some of the other columns of the lines of these two values I have on average.

    So, for example, I have the source table table S, with the values of Company_Name, Date, name of the Emp, salary, Date. I have to calculate the average salary, corresponding to the date criteria I described before. So I have to insert into another table (the average value) while keeping other data (Date, name of the Emp) etc.

    This is really confusing me. I think that the mix of simple db and sql pl theory is to play with my head.

    I know that the scenario is a bit confused, so please ask any questions! I'll check this thread very frequently!

    Frankly speaking, I'm lost.

    Please post some samples of entry and your required output in a formatted way.

    Kind regards.

    LOULOU.

  • Conditional display of the region

    Hello

    I'm under APEX 5.0 on an Oracle 12 c server.  I created an application that will be used by several different people in an office.  Each person needs to see another part of Contacts when they connect.  I also gives users the option to display or not to display various parts on the home page according to their preference.  The issue I'm having is trying to control the display of a region where the APP_USER must match a user name AND an element (P7_CONTACTS) is not equal to 'C '.  If it's only one condition, I have no problem with displaying or hiding in the region, but with multiple conditions, I can't find a solution.  I thought to use the condition EXISTS, but can't get that to work, most likely because I write the incorrect query.  I think I'm missing something obvious, but frustration is clouding my ability to think clearly at this point.  Any suggestions would be greatly appreciated.

    Bob

    wisers wrote:

    The session state Viewer shows that: p7_contacts is 'C' when the box is checked and null when it is turned off.

    Second, the State must be:

        :app_user = 'WISERS'
    and :p7_contacts is null
    

    A null value is not equal to, or does not correspond to anything...

  • By selecting an option in a drop-down list displays a hidden text box and checkbox

    Being fairly new to the creation of pdf form I would be grateful for some assistance.

    I'm looking to have a number of choices in a drop-down list (dropdown1) show a hidden textbox (textbox1) and the box (checkbox1)

    The selections that would show are:

    iPad only

    Or

    Laptop and iPad

    I'm sure it's rather easy.

    Thanks in advance

    You can use this code as the custom for the drop-down list field validation script:

    var f1 = this.getField("textbox1");
    var f2 = this.getField("checkbox1");
    
    if (event.value=="iPad Only" || event.value=="Laptop and iPad") {
        f1.display = display.visible;
        f2.display = display.visible;
    } else {
        f1.display = display.hidden;
        f2.display = display.hidden;
    }
    
  • Conditional display for the links in the column?

    Hi all

    For a report, if you configure a column under the 'attributes of column' binding so that the report has a link to turn an edit form, is it possible to set a condition on this somewhere so that only certain LINES has an icon link (or text)?

    NT

    You can use a case statement?

    select case
              when column1 = 'x' then '' || column2 || ''
              else column2
           end
    from table
    

    Minh

  • Problem with the display of the percentage value

    Hi all

    I have a report that calculates a percentage based on 2 digits. For example, Actual_count = 15000 and forecast_count = 14900. To calculate the percentage that I use the following SQL statement
    select ROUND(((ACTUAL_COUNT-FORECAST_COUNT)/FORECAST_COUNT)*100,1) as "PERCENTAGE" from table
    This gives me the result of "-.» 7. " It's the right answer, but what I would like is the answer display "-0.7".

    Of course, I only want this when the percentage is less, when more is not a problem.

    The reason I want it is because it is easier to read, my manager has been confusing figures think that negative numbers are numbers more (seemingly his eyesight is not what it was 8-P).

    Would this be possible?

    Thanks in advance,
    -N.S.N.O.

    Hello

    Go to the attributes of the report, click on the link Edit next to your percentage column, then enter a format of 999G999G999G999G990D0 mask

    This should do the trick.

    See you soon

    Ben

Maybe you are looking for

  • How to get previous panelhandle

    Hi all I created 3 panels different (panelhandle1, panelhandle2, panelhandle3). Configuration1: when I click on a button, the callback function displays the panel2 with this code: HidePanel (panelhandle1); DisplayPanel (panelhandle2); In panel2: it's

  • My Hotmail account has been hacked and now blocked.

    E-mail address is removed from the privacy *. I tried to complete the validation form many times but keeps an error message - there is a problem, please try again original title: PIRATE ACCOUNT has NOW BEEN BLOCKED

  • How can I get rid off in media player 11 skins?

    downloaded the two skins of microsoft, no work at all, and I want to delete them.

  • mSATA SSD as cache

    Hi, guys. I'm debating getting a mSATA SSD. Is it possible to to use as a cache for the hard drive, rather than as a boot device, a concept similar to Intel's SRT? What software does take?

  • This application failed to start because MSVCR71.dll was not found

    This mistake was appearing on with various applications when you try to start them.  I get the error, but then it opens the program anyway.  I had uninstalled Chrome, because I was not using it, but of the then reinstall Chrome because he hijjacked m