How to script text field based on checkbox selection

I've written a script to format specific text boxes based on what checkbox is chosen. However, I'm not sure what I need to script in order to CLEAR the text field once the checkbox is unchecked. As it stands now if the checkbox is selected it formats the text field with the necessary information, but if it's unchecked the information stays in the box. I'd like to be something like 'if all boxes are Off then display 0.00.' I've included the current script for reference
var one = this.getField("Emp 500");
var two = this.getField ("Emp+C500");
var three = this.getField("Emp+S500");
var four = this.getField("Fam500");
var five = this.getField("NC500");
var six = this.getField("Medical");
if (one.value == 'Yes') {six.value='70.70'}        
else if (two.value ==
'Yes') {six.value='127.20'}
else if (three.value == 'Yes') {six.value='141.32'}
else if (four.value == 'Yes') {six.value='198.00'}
else if (five.value == 'Yes') {six.value='0'}
var one = this.getField("Emp 1500");
var two = this.getField ("Emp+C1500");
var three = this.getField("Emp+S1500");
var four = this.getField("Fam1500");
var five = this.getField("NC1500");
var six = this.getField("Medical");
if (one.value == 'Yes') {six.value='61.47'}
else if (two.value == 'Yes') {six.value='110.49'}
else if (three.value == 'Yes') {six.value='141.32'}
else if (four.value == 'Yes') {six.value='123.04'}
else if (five.value == 'Yes') {six.value='0.00'}

Hi Gayathri,
Gayathri Venugopal wrote:
Hi,
I have two text items. Need to create dynamic action for the following,
1. Order_type - Drop down values having CONSUMER & WHOLESALE.
2. Order_number- Text field
Order number should be disabled and only on selection of order type ,order number should be enabled.
Can someone please help me on this?
Create two dynamic action
1. Make it order number item disable on page load.
   Event : Page Load
   Action : Disable
   Fire When event result is : True
   Selection Type : Item
   Item : Your order number item
2 . enable and disable order number on selection of order type(assuming when order type is null it is disable otherwise it is enable)
    Event : Change
    Selection type : item
    Item : your order type item
    condition : is not null
True Action
    Action : Enable
    Fire When event result is : True
    Fire on page load : True
    Selection Type : Item
    Item : Your order number item
False Action
    Action : Disable
    Fire When event result is : False
    Fire on page load : True
    Selection Type : Item
    Item : Your order number item
Hope this helps you,
Regards,
Jitendra

Similar Messages

  • How do I use Javascript to populate a text field based on a selection from a drop down box?

    Greetings,
    I have virtually no experience with JavaScript and I am trying to figure out how to add some basic automation features to an Adobe form.  I have a drop down box called "Hospital_Name" that will contain approximately 7 possible selections.  When the user makes a selection, I would like to have the text field (called "Hospital_Address") below the drop down box populate with the corresponding address for the selection.  I have the "Hospital_Address" text field configured for multiple lines and would like the address to have a line break between the street address and the city/state/zip.
    For example, if the user selected "Hospital 1", the text field would display:
    123 Main St
    Anytown, CA 12345
    Any help or examples you can provide would be greatly appreciated.

    You have the element names within the object within brackets.
    Make sure your brackets are properly placed and matched.
    // Place all pre-population data into a single data structure
    var Location = {
    "--Hospital--":{ line1: " ", line2: " " },
    "Bellevue Medical Center":{ line1: "2500 BMC Drive", line2: "Bellevue, NE 68123" },
    "CHI Bergan Mercy":{ line1: "7500 Mercy Road", line2: "Omaha, NE 68124" }, 
    "CHI Immanuel":{ line1: "6901 N. 72nd Street", line2: "Omaha, NE 68122" }, 
    "CHI Lakeside":{ line1: "16901 Lakeside Hills Court", line2: "Omaha, NE 68130" }, 
    "CHI Midlands":{ line1: "11111 S. 84th Street", line2: "Papillion, NE 68046" },
    "Creighton University Medical Center":{ line1: "601 N. 30th Street", line2: "Omaha, NE 68131" },
    "Nebraska Medical Center":{ line1: "4400 Emile Drive", line2: "Omaha, NE 68105" }
    // some debugging code to see location names;
    console.show();console.clear():
    for(I in Location) {
    console.println(I);
    // end debugging code;
    function SetFieldValues(Hospital_Name) {
        this.getField("AddLine1").value = Location[Hospital_Name].line1;
        this.getField("AddLine2").value = Location[Hospital_Name].line2;
    This is not a beginners task but requires a fair amount of knowledge about the structure of objects, defining strings, and structure of arrays.
    Are you sure you have all the field names correctly spelled and capitalized?
    Do you get any error in the JavaScript console?
    Just trying the line that defines the "Location", I get the following error:
    SyntaxError: invalid property id
    1:Console:Exec
    undefined
    All the form field in a PDF are processed by using JavaScript and any error in any script will stop JavaScript processing.
    It might help to have a link to the problem form.
    Make sure your brackets are properly placed and matched.
    // Place all pre-population data into a single data structure
    var Location = {
    "--Hospital--":{ line1: " ", line2: " " },
    "Bellevue Medical Center":{ line1: "2500 BMC Drive", line2: "Bellevue, NE 68123" },
    "CHI Bergan Mercy":{ line1: "7500 Mercy Road", line2: "Omaha, NE 68124" }, 
    "CHI Immanuel":{ line1: "6901 N. 72nd Street", line2: "Omaha, NE 68122" }, 
    "CHI Lakeside":{ line1: "16901 Lakeside Hills Court", line2: "Omaha, NE 68130" }, 
    "CHI Midlands":{ line1: "11111 S. 84th Street", line2: "Papillion, NE 68046" },
    "Creighton University Medical Center":{ line1: "601 N. 30th Street", line2: "Omaha, NE 68131" },
    "Nebraska Medical Center":{ line1: "4400 Emile Drive", line2: "Omaha, NE 68105" }
    function SetFieldValues(Hospital_Name) {
        this.getField("AddLine1").value = Location[Hospital_Name].line1;
        this.getField("AddLine2").value = Location[Hospital_Name].line2;

  • Dynamic Action - How to enable  text field based on a condition

    Hi,
    I have two text items. Need to create dynamic action for the following,
    1. Order_type - Drop down values having CONSUMER & WHOLESALE.
    2. Order_number- Text field
    Order number should be disabled and only on selection of order type ,order number should be enabled.
    Can someone please help me on this?

    Hi Gayathri,
    Gayathri Venugopal wrote:
    Hi,
    I have two text items. Need to create dynamic action for the following,
    1. Order_type - Drop down values having CONSUMER & WHOLESALE.
    2. Order_number- Text field
    Order number should be disabled and only on selection of order type ,order number should be enabled.
    Can someone please help me on this?
    Create two dynamic action
    1. Make it order number item disable on page load.
       Event : Page Load
       Action : Disable
       Fire When event result is : True
       Selection Type : Item
       Item : Your order number item
    2 . enable and disable order number on selection of order type(assuming when order type is null it is disable otherwise it is enable)
        Event : Change
        Selection type : item
        Item : your order type item
        condition : is not null
    True Action
        Action : Enable
        Fire When event result is : True
        Fire on page load : True
        Selection Type : Item
        Item : Your order number item
    False Action
        Action : Disable
        Fire When event result is : False
        Fire on page load : True
        Selection Type : Item
        Item : Your order number item
    Hope this helps you,
    Regards,
    Jitendra

  • How do I add and remove text in a text field with a checkbox?

    How do I add and/or remove text in a text field with a checkbox?
    this is my script in the text box......
    event.value="Hello, this is my narrative. \r\n\nFamily: \r\n\n" + this get.Field("FirstName").value + " " + this.getField("LastName").value + was born on"=this.getField("DOB.value + "\r\n\n + this.getField("drpField").value + "\r\n\n" + this getField("Father").value
    The text box looks like this...
    Hello, this is my narrative.
    FAMILY:
    John Smith was born on 08/02/2000
    Boby Lou
    Jack Smith
    I need to add/or remove the father field (Jack Smith) & r/n/n with a check box.
    Does anyone know how to do this?

    There are multiple errors in your code...
    Use this code instead (adjust the name of the check-box):
    var msg = "Hello, this is my narrative. \r\n\nFamily: \r\n\n" + this get.Field("FirstName").value + " " + this.getField("LastName").value + was born on" + this.getField("DOB.value) + "\r\n\n" + this.getField("drpField").value;
    if (this.getField("FatherCheckBox").value!="Off")
         msg += "\r\n\n" + this getField("Father").value;
    event.value = msg;

  • Limit the amount of characters of a text field based on first digit

    Hello and thanks in advance for your help!
    I would like to limit the amount of characters of the text field based on the first digit of the number (the text field is only limited to a number format...no decimals, no commas).
    For example, if the number begins with a 3, I would like to limit the text field to allow only ten characters. I have three scenarios but if I could get started with some code and what is the best place to add it (keystroke or validation?) I can take it from there. Thanks again for your help!!

    I've written this code for you that does that. Use it as the field's custom Keystroke code:
    // Validate that only digits are entered
    if (event.change) {
        event.rc = /^\d+$/.test(event.change);
    // Validate string length if it starts with 3
    if (/^3/.test(AFMergeChange(event))) {
        event.rc = AFMergeChange(event).length <= 10;
        if (!event.rc) app.alert("If the number starts with \"3\" it may not be longer than 10 digits.",1); // optional error message
    You can duplicate the second part of it for additional conditions, but keep in mind that this code won't even let you remove the first character in the field if the result is an invalid one.
    For example, if you enter "234567890123456" then you can't remove the "2" at the start because that would result in an invalid number. You can remove any of the other digits, though, and when it's 10 digits or less then you could remove the starting "2" as well.

  • Dynamically enable a field based on a selected table row

    Hi everyone.
    I'm getting really confused right now, please show me the right way. My approach may be, and probably is, wrong since I am self learning this and all I have is an ASP.NET background.
    I have a page with a table in it. I've created a DataControl for a collection I've made and mapped it to the table. I added a column that shows an "edit" button. On it's click, I open a popup that shows the selected row's data. Naviguation controls are also present on the popup.
    This is working fine.
    My problem comes in the popup. Each row has multiples fields. These fields, shown on the popup, need to dynamically be enable/disable. To toggle those field, the only way I can see right now is to have a function that takes into parameter the rowId and the fieldName. Based on those two fields, I can get the necessary information to know if I need to enable or disable the control.
    What I was aiming for, but then again I totally failed, was to have that function called on the "enabled" EL Expression, returning a Boolean.
    Now that this has been said, can someone guide my on how to dynamically enable/disable each field based on the selected row.
    Thanks !

    Above +
    why don't you create a bean method that returns a Boolean ans through EL Expression Builder select the method to this property.
    btw .. on which components are you setting this?
    Also,
    If there is business logic that prohibits to update this object unless that is met.. you can also do it as..
    In EOImpl .. override isAttributeUpdateable(int i) method eg:
    @Override
    public boolean isAttributeUpdateable(int i) {
    if(i == this.ENAME && "KING".equalsIgnoreCase(this.getEname())){
    return true;
    }else
    return super.isAttributeUpdateable(i);
    and then in UI for the component say
    ReadOnly = #{bindings.Ename.updateable}
    Or, In UI
    disable = #{ bindings.Ename.attributeValue == 'KING' & bindings.Mrg.attributeValue == null ? true : false}
    adf does provides many ways to do it ..
    Cheers, Amit

  • Auto populate fields based on dropdown selection

    New to forms and needing some insight
    Is there a way to auto populate a series of fields based on the selection of a dropdown box
    for instance;
    chosing a customer's name from a dropdown box would auto populate the address, city,state zip etc...

    Yes, but not easy and you do not want to have a large number of items.
    Programming List and Combo fields in Acrobat and LiveCycle forms - Part 1 by Thom Parker

  • How do you auto-populate a text field based on entries in other text fields?

    I would like to be able to have a text field that populates as "Complete" or "Incomplete" based on whether all the mandatory text fields have been filled out or not.
    For example, if the "First Name," "Last Name," and "City" text fields are not filled out, the "completion status" text field will show "Incomplete" and once they are filled out, the "completion status" text field will turn into "Complete."
    How would I do this using javascript? I've searched the web for a tutorial, but most of the results seem to be dropdown-centric.
    Please point me in the right direction!

    Try the script below. I put this on the calculate event for Field1
    if(FirstName.rawValue == null || LastName.rawValue == null || City.rawValue == null){
    Field1.rawValue = "Incomplete"
    else
    Field1.rawValue = "Complete"

  • How do I build a field based on Checkboxes?

    I am VERY new to Javascript...but I think I can do what I want, just not sure of the syntax...
    I have a very large form with lots of checkboxes.
    I want to build (fill) some text responses based on those checkboxes.
    Assuming I have checkboxes 1 -3  (checkbox.1 - checkbox.3)
    In each checkbox the export value is a something like "This is the text associated with checkbox  #1"
    On the last page there is a text Box called "Summary" (summary.1)
    On my LAST page, I want to have a button with a MOUSE-UP script that takes the Export values in checkboxes 1 -3 and puts them into the Textfield "summary"
    This SHOULD be easy right?
    Eventually, if everything else works, I want to build a for-next loop that will cycle through LOTS of checkboxes and build a multi-line Summary, and maybe even Sort it -BUT- only do that when the "build" button is pressed, otherwise the form would always be thrashing....
    This assumes that a non-checked box exportvalue = NUL

    Ok, I wanted to invoke a interactive debug session so I could type in javascript and see what it returned...
    I figured I could fill in the form and have the debugger open next to it.... and qwery the form interactively by typing in commands as if they were script actions
    Uhm...where is that... I tried in both Acrobat Pro-XI and reader to invode a debug session.  Reader doesn't have one and Pro just showed me the console but nothing happned when I typed something into the console.  I expected an error message or something.

  • How do I fill and show/hide a series of text boxes based on checkboxes?

    I have a series of checkboxes on a form (each of which requires some additional information to be entered) and a series of text boxes further down the page to house any necessary detailed information. 
    I have hidden the detail fields and coded the form so that for each of these checkboxes that is checked a row of detail text boxes appears with the checkbox title in the activiy type field, and if a checkbox is subsequently un-checked the last row of detail text boxes is hidden. 
    The problem with this is that if the user unchecks any box other than the most recently checked one the data for the option they just unchecked still shows, but the data for the last option they selected does not. 
    Does anyone have a solution that would make sure the detail fields for the boxes that are checked is displayed in the detail text boxes that are showing when a checkbox is unchecked, regardless of the order in which the boxes are checked/unchecked?
    This is what my form looks like, with the example where Cash Withdrawals is unchecked but appears in the detail and Remote Deposit Capture is checked but was hidden with the last line:
    The detail groups are named Act1.child, Act2.child, etc. where the description field (filled in the example above) is Act1.type, Act2.type, etc.
    Here is the script I'm using on the checkboxes to achieve what I'm getting now:
    var useSet = this.getField("Set").value;
    var clrSet = this.getField("Clr").value;
    var useType = useSet + ".type";
    var clrType = clrSet + ".type";
    if (this.getField("CheckboxName").value != "Off") {
        this.getField(useType).value = "Check Box Desription";
        this.getField(useSet).display = display.visible;
    else if (this.getField("CheckboxName").value == "Off") {
        this.getField(clrType).value = "";
        this.getField(clrSet).display = display.hidden;
    and here is the script for the hidden boxes that determine what sets are filled and what sets are cleared and hidden:
    Custom Calculation Script for "Set":
    var sOne = this.getField("Act1.type").value.length;
    var sTwo = this.getField("Act2.type").value.length;
    var sThr = this.getField("Act3.type").value.length;
    var sFour = this.getField("Act4.type").value.length;
    var sFive = this.getField("Act5.type").value.length;
    var sSix = this.getField("Act6.type").value.length;
    var sSev = this.getField("Act7.type").value.length;
    if (sOne == 0) {event.value = "Act1"}
    else if (sTwo == 0) {event.value = "Act2"}
    else if (sThr == 0) {event.value = "Act3"}
    else if (sFour == 0) {event.value = "Act4"}
    else if (sFive == 0) {event.value = "Act5"}
    else if (sSix == 0) {event.value = "Act6"}
    else {event.value = "Act7"}
    Custom Calculation Value for "Clr":
    var cOne = this.getField("Act1.type").value.length;
    var cTwo = this.getField("Act2.type").value.length;
    var cThr = this.getField("Act3.type").value.length;
    var cFour = this.getField("Act4.type").value.length;
    var cFive = this.getField("Act5.type").value.length;
    var cSix = this.getField("Act6.type").value.length;
    var cSev = this.getField("Act7.type").value.length;
    if (cSev != 0) {event.value = "Act7"}
    else if (cSix != 0) {event.value = "Act6"}
    else if (cFive != 0) {event.value = "Act5"}
    else if (cFour != 0) {event.value = "Act4"}
    else if (cThr != 0) {event.value = "Act3"}
    else if (cTwo != 0) {event.value = "Act2"}
    else {event.value = "Act1"}

    Hi Andi,
    Please consider the following “solution” too.
    Preliminaries
    An indicator can be considered a variable in JavaScript.
    If P is an indicator, m(P) refers to the value of the indicator.
    Data for Control
    There are four checkboxes: C0, C1, C2 and C3.
    There is an indicator for each checkbox: CP0, CP1, CP2 and CP3.
    If checkbox Ci is checked then checkbox indicator CPi has the value i+1; in other words, m(CPn) = i+1. If checkbox Ci is not checked then checkbox indicator CPi has the value 0; in other words, m(CPn) = 0.
    There are four sets of detail fields: A0, A1, A2 and A3.
    There is a detail fields indicator for each detail fields: AP0, AP1, AP2 and AP3. If detail fields Ak have the details for the checked checkbox Ci then APk has the value i+1; in other words, m(APk) = i+1. If detail fields Ak do not have any details for any of the checked or unchecked checkbox then APk has the value 0; in other words, m(APk) = 0.
    The sets of detail fields are organized in sequence. The “top” or “first” set is AP0. It is followed by AP1. Then followed by AP2. The “bottom” or “last” set is AP3.
    Consider an example with one checkbox selected. In this case m(CP2) = 3; m(AP0) = 3; m(CPi) = 0 for i=0, 1, 3; and m(APk) = 0 for k=0, 1, 3. See the following diagram too (see Figure 1).
    Events, Processes and Additional Data for Control
    Computation begins when a user event is captured by the system (such as a mouse up event in an AcroForm field like a button or a checkbox).
    Checking Process
    If a checkbox is checked (TNj), it is noted with an indicator (P0).
    Shift Process
    Given a noted checkbox, the search for a candidate set of detail fields to use for the noted checkbox begins.
    The first candidate is the bottom of the sequence. This is also the current candidate, k. Thus k=3.
    The current candidate is remembered by marking (TSk,j) the detail fields indicator (APk).
    If k=0 then the shift process ends and the current candidate is the candidate.
    If k > 0 and m(APk-1) = 0, the current candidate becomes APk-1 and step 8c is repeated.
    If k > 0 and m(APk-1) != 0, then the shift process ends and the current candidate is the candidate.
    Unchecking Process
    If m(CPi) != 0 and m(CPi) = m(APk), then the checkbox can be unchecked (TRk,i).
    Shift Process
    If m(APk)=0 and m(APk+1) > 0 then shift (TSk,m(APk+1)). At the end of this shift, m(APk) > 0 and m(APk+1) = 0. Let k = k + 1.
    If m(APk+1)>0 then repeat 9a. If m(APk+1)=0 then the shifting process ends.
    Last Events and Proceses
    Details fields can be initialized (TIk,j) and displayed (TDk,j) or cleared (TCk,j) and hidden (THk,j). These actions depend only on m(APk). However it would be a good idea to trigger these functions right after a shift process ends and on affected details fields.
    Process Diagram of One Checked Checkbox
    Figure 1 is a process model of the checkbox process with one checked checkbox.
    Figure 1 Checkbox Process Model
    Regards,
    John

  • How to show a text field based on what is entered in a date field

    Hi there LiveCycle experts!
    I have a form with a text field that I want to show only if the value of the previous date field once entered is less than 1 month from today?
    Any help appreciated, been researching in vain for hours!!!
    Sarah

    Wow Steve - thanks so much this is so exciting I just love learning these new scripts.
    I assume I need to make the text field 'Hidden' - ?
    I seem to be struggling a little to get it working - are you able to have a quick squizz at my document - it is in the very early stages!
    Regards,
    Sarah Milne
    FACEBOOK : Join our  'BritBound Social Events' Group on Facebook to receive details of forthcoming social events...click here to join. 
    For a sociable & stress free arrival experience!
    BritBound London Office: Britain & London Visitor Centre, 1 Regent Street, London, SW1Y 4XT.
    Tel UK: | 0845 450 3536 | From OS + 44 (0) 20 7808 3815
    Tel OZ: | Sydney: (02) 8003 7651  | Melbourne: (03) 9005 8304 | Brisbane: (07) 3102 9766
    Tel NZ: | Auckland: (09) 889 3175 | Wellington: (04) 889 2015   | Christchurch: (03) 669 2032
    Website:        www.britbound.co.uk
    E-mail:           [email protected]
    Click Here to find out more about: | UK VISAS  | MOBILE PHONE CONTRACTS FOR NEW ARRIVALS TO THE UK  |  UK ACCOMMODATION  |  AIRPORT TRANSFERS  |  UMBRELLA COMPANIES   |  DISCOUNTED INTERNATIONAL BANK TRANSFERS  |  SOCIAL EVENTS   |  TAX REFUNDS  |  NATIONAL INSURANCE (NI) NUMBERS
    Disclaimer: The information contained in or attached to this message is intended only for the people it is addressed to. If you are not the intended recipient, any use, disclosure or copying of this information is unauthorised and prohibited. This information may be confidential or subject to legal privilege. BritBound cannot accept liability for any virus damage caused by this message. This documentation is for your general information, and is not to be construed as advice. Clients should not act on the information contained herein alone, and should seek independent advice if necessary.

  • HELP! Script to populate a text field based off of whats picked in a dropdown on a previous page?

    Alright hopefully i can explain this good enough.
    I have a dropdown box that has two different options to pick from.  For example:
    Dropdown1 has:  Option A
                             Option B
    On the other page I have two text fields.  TextField1 just shows whatever is picked from the Dropdown1 (Option A or Option B).  TextField2 needs to do the following:  If Option A is picked i just need the field to stay blank.  If Option B is picked i need it to populate specific text.
    I thought i figured out a way to do this but it seems that since it is on a different page the script will not fire.
    Any help is much appreciated!!!!!!

    Hi,
    With the first issue: having the dropdown and the first textfield displaying the same value, the easy solution is to use Global Binding.
    Make sure that the dropdown and the first textfield have the same name in the hierarchy.
    The select one of them and in the Object > Binding palette, set the binding to Global.
    In the dropdown go to the Object > Binding palette and make sure that "Specify values" is NOT ticked.
    It is probably a good idea to set the textfield to read only, in the Object > Value palette. This would prevent the user overwriting the value set by the dropdown.
    No script required. Whatever is in the dropdpwn will appear in the textfield.
    The second issue needs a small script in the calculate event of the second textfield. This looks at the value in the first textfield (TextField1) and sets its own value. This is JavaScript:
    if (TextField1.rawValue == "Option B")
         this.rawValue = "Specific text";
    else
         this.rawValue = null;
    There are some examples here: http://assure.ly/jtTkdO, http://assure.ly/fYCuQ2.
    Hope that helps,
    Niall

  • How to hide text field item based on true or false cases in oracle apex

    Hi,
    I have a set of text Field items in oracle apex:
    Order Number
    Revision Number
    When we open the report, revision should be hidden.
    Only when the user enters unique order number (non-duplicate order numbers), revision number should be visible.
    If he enters duplicate order number, revision number should be hidden.
    Please help.

    Hi 2932464,
    2932464 wrote:
    Hi,
    I have a set of text Field items in oracle apex:
    Order Number
    Revision Number
    When we open the report, revision should be hidden.
    Only when the user enters unique order number (non-duplicate order numbers), revision number should be visible.
    If he enters duplicate order number, revision number should be hidden.
    Please help.
    Giving you example how to achieve this.
    Step 1. Create three Page Items
        1) P1_ORDER_NO - Text Field
        2) P1_REVISION_NO - Text Field
        3) P1_ENABLE_DISABLE_REVNO  - Hidden,Value Protected - No
    2. Create 3 Dynamic Actions
    1) Disable revision number on page load
        Event - Page Load
        Action - Disable
        Fire When Event Result Is  - True
        Selection Type - Item
        Item - P1_REVISION_NO
      2) Check duplicate order number
        Event - Change
        Selection Type - Item(s)
        Item(s) - P1_ORDER_NO
        Condition - is not null
        Action - Execute PL/SQL Code
        Generate opposite false action - Unchecked
        Fire When Event Result Is  - True
        Fire on page load - Unchecked
        Stop Execution On Error - Checked
        Wait for Result - Checked
        PL/SQL Code -
    declare
    l_count number;
    begin
      select count(*) into l_count
        from emp
       where empno = :P1_ORDER_NO;
    if l_count > 0 then
      :P1_ENABLE_DISABLE_REVNO := 1;
    else
      :P1_ENABLE_DISABLE_REVNO := 0;
    end if;
    end;
    Page Items to Submit = P1_ORDER_NO
    Page Items to Return  = P1_ENABLE_DISABLE_REVNO
    3 ) Enable and Disable Revision Number
        Event - Change
        Selection Type - Item(s)
        Item(s) - P1_ENABLE_DISABLE_REVNO
       condition - greater than or equal to
       value  - 1
       Action - Disable
       Fire on Page Laod - Unchecked
       Generate opposite false action - checked
       Selection Type = Item(s)
       Item(s) - P1_REVISION_NO
    Hope this helps you,
    Regards,
    Jitendra
    DER_NO

  • Check for text in a text field and make checkbox mandatory

    I have a text field where if the user has entered a value, then the checkbox that follows must be mandatory. I have this script that works (sort of), but I'm not sure which event to use to get the results I want. I want the message and the checkbox to be mandatory only if something is typed in the field.
    Here's the script:
    if ((this.rawValue != "null") || (this.rawValue != ""))
         CheckBox3.mandatory = "error";
         app.alert("Please indicate that you have reviewed the similar profile and approve it");    
    else if ((this.rawValue == "null") || (this.rawValue == ""))
         CheckBox3.mandatory = "disabled";
    Thanks,
    MDawn

    That worked. Thank you. I have another problem now. If the user deletes the information typed in the text field, the message box still displays and the checkbox is still outlined in red indicating it's required and it shouldn't be.
    Thanks,
    MDawn

  • Update a text field based on a SelectOneChoice field

    Hi,
    I have a set of Create, Confirm and Thankyou screens. These screens are bound to a global view object. The create screen has a SelectOneChoice element which allows the user to pick an employee. When the selection is made, I need to display the employee's department in a read only text field below the dropdown. The Employees list(SelectOneChoice) is associated to the read only view object and this view object also has the employee's department information. Im dont know how to set the department name in the text field and refresh the screen. Any help is appreciated. Thank You.

    Frank, thanks for you time. Please see my answers below.
    Hi,
    can you help me creating a reproducable testcase
    based on the HR schema where we have a Departments
    and Employees tables. To understand your usecase I
    have some questions:
    Im not too familiar with HR Schema.
    >
    First of all however, what is a "global view object",
    and is it safe to assume you are using ADF Business
    Components?
    Its the "Globals View Object" as described in the SRDemo for creating a new Service Request and yes I am using ADF Business Components.
    >
    Which version of Oracle JDeveloper do you use ?
    10.1.3
    >
    The usecase I understand is that you have a
    selectOneChoiceList that whenever you select a new
    name should update a read-only text field with the
    department name. Is this correct ? Or is there more
    in it ?
    Heres the complete description. There are 4 fields on the screen
    1. Program Name (text input field, - required field)
    2. Program Category (SelectOneChoice field - required field)
    3. Employee Name (SelectOneChoice field - required field)
    4. Employee Department (Text output field - based on 3 above)
    What you have described above is working for me now, but everytime I select a value for 3, it does the required fields check and gives a message like "1 & 2 are required and a value must be entered", this validation should only occur when my continue button is clicked.
    >
    The department name should be displayed only (read
    only), or is it also bound to what you call "global
    view"?
    Yes its read only but I need to bind to the Globals view as I need to display it in the confirmation screen.
    >
    Also, just to be sure, is the department name part of
    the VO or is it the departmentId?
    The screen is bound to the Globals View, the selectOneChoice values are displayed from another view(EmployeeList view) which has the department name.
    >
    Frank

Maybe you are looking for

  • HtmlText possible bug?

    I have an app that pulls in xml data and places it appropriately into textfields. Some data looks like this: <![CDATA[<p>Click on the links below for more information about the types of crash sensors.<br/><li><a href='event:Safing Sensor'><font color

  • Working on a file in CC created in previous versions

    I work at a printing company and we get files from hundreds of different clients. Our preflight person that starts every job want to open every job in CC and use CC regardless of what version it was created in. I think this is a bad practice and we s

  • Qualifed update is deleting exising records

    Hello, We recently installed MDM 5.5 SP06 Patch03 Release (Note 1234675) and now I cannot use Import Manager to update fields on a Qualified records.  The was working perfect prior to this patch. Issue:   Qualified table is Partner Functions Non Qual

  • ORDDM Derived Layer Question

    This is a question regarding best practices. The ORDM tutorial from Oracle (http://st-curriculum.oracle.com/tutorial/ORDMTutorial/player.htm) states for the ORDM Derived Layer: "The Derived Data Model uses a low-level combination of base tables to pr

  • About package global variable.

    Hi All, Could you please anyone tell me from which Data Dictionary tables we can find to definiton of Package global variables which is declared in specification part. I tried in ALL_ARGUMENTS but I failed to get it. Thanks in advance.