Combo box with multiple variables pre populating multiple fields and max value validation script help

I am creating a pdf form that will be used as a calculator, and my javascript knowledge is pretty rudimentary. I can do the simple things, some of what I need to do is over my head.
1. I believe I need to use a combo box to pre populate certain fields. I have 13 variables in the dropdown to choose from, and whatever the client chooses will pre populate three other fields (and each of the 13 variables will populate those three fields differently). I'm not exactly sure how to go about doing this. Is it custom keystroke script or does it require a document script? Also, I'm guessing that whatever script will be a series of if/then statements, correct?
2. Once all the fields have been populated (be it pre population or filled in by the customer), I need to calculate the answer which is not my main problem—I already have the proper calculations in place and they work. The problem is that the answer has a maximum value even if the actual value goes over that max number. So, the actual answer is 14 but the max value can only be 12. How do I get the calculation to replace that actual number (14) with the max number (12)? Is that in the validation tab or should that go elsewhere?
I feel like I know just enough to be dangerous but not terribly effective. Any help is appreciated.  
Thanks!

1. There is a tutorial on this here:
http://acrobatusers.com/tutorials/change_another_field
2. To set the maximum value to 12, try this as the custom calculation script for the field:
//Custom calculation script
//Get value of text field
var a = this.getField("Text1").value;
//If it is > 12, then make it 12
if (a > 12){
a=12
event.value = a
You need to replace "Text1" with the name of the field in your form.

Similar Messages

  • Combo box with bind variable from popup

    Hi.
    I had two comboboxes on a form, one having a bind variable. It works great, with the first one as bind field.
    But i want to have the first LOV to be a POPUP. So, the second LOV (combo box) needs to be refreshed when a user has picked a value from the popup list. When i do that, the second LOV is not refresehed...
    Is there a way to do this?
    (3.0.9.8.3.A)

    Hi,
    This was a bug and is fixed in 30984.
    Thanks,
    Sharmila

  • How to fill combo box with list of all SQL server

    Ok, I know how to find all SQL servers that I need, I have code for that task, and I have Array of all servers.
    My problem is ...
    I made setup project and do a huge work, and in the end this task appear!
    I used ORCA tool to change TextBox (A) template in visual studio (2008 by the way), and I transform first TextBox to ComboBox.
    Now, the little part that I'am missing is how to fill this combo box with a result of my function for listin SQL servers?
    Can I somehow send combobox object to myMethod:
    private void FillCombo(ComboBox cmb)
          // do the job
    or
    instanceOfThisCombo.Items.Add(listOfSQLServers);
    please help me to solve this... thanksc#

    Hi Valerij,
    The ComboBox control in an MSI dialog uses the ComboBox table to populate the items in it. To get what you want, you need to update the ComboBox table in the MSI package with your application and run the MSI package. The following KB article describes how to dynamically populate a ListBox control in Windows Installer:
    http://support.microsoft.com/kb/291329
    This method introduced in the above KB article also applies to populating a ComboBox control in Windows Installer.
    I don't think it's possible to run the application as a Custom Action from within the MSI package because the application will modify the content of the MSI package which is currently running. So you need to launch the MSI package from within your application after updating the ComboBox table. In short, when installing, just run your application which updates the ComboBox table and install the MSI package.
    Hope this helps.
    If you have any question, please feel free to let me know.
    Sincerely,
    Linda Liu

  • How I can stop the combo box with list of values from fireing validations

    Hi I'm using Jdeveloper 11.1.2.3.0
    Using Hr Schema employees table
    I Display employees data in af:table
    and I make List Of values on Department_id filed to easy change the employee department
    and another one on Job_id filed
    and Imake them UI Hints as ( combo box with list of values ) in the employeesVO
    the problem is when I Select a value from department or jobs ( combo box with list of values )
    fires the entire filed validations for mandatory atributes
    Note : the af:table Property ( contedelivery) is set to (immediate )
    How I can stop the combo box with list of values from fireing validations

    check it out.,
    http://andrejusb.blogspot.in/2012/09/what-to-do-when-adf-editable-table.html

  • When i open finder the windown is a completely blank grey box with the title "Window" as a header, and all my folders will not open when clicked

    when i open finder the windown is a completely blank grey box with the title "Window" as a header, and all my folders will not open when c
    the problem started when my computer screen broke from something falling on it, the screen was replaced but the people that fixed it for me told me there may be some hard disk issues when a problem like this happens, they ran their own checks and found nothing and i was given my laptop back, then when i tried to use it, i found this problem. everything else works fine.
    i have shutdown and re-started my computer multiple times and i have also re-started finder multiple times, both having no effect
    i have also done a few other things to find that my apple.com.finder.plist and apple.com.sidebar.plist are both missing, and are not re-creating themselves, i have found no way to bring them back either.
    any help would be greatly appreciated, thanks

    there is an app called daisydisk on mac app store which will help you see exactly where the memory is focused and consumed try using that app and see which folders are using more memory

  • Help with creating a form, I want to add a check box to enable me to unlock certain fields and deselect the block again

    Help with creating a form, I want to add a check box to enable me to unlock certain fields and deselect the block again

    Look to the right under "More Like This". Your issue has been discussed many many times. The error you are seeing is because you do not have enough free "contiguous" space on your hard drive. Read the other threads that address this issue to find how to solve the issue.
    Or, put "The disk cannot be partitioned because some files cannot be moved" into the search box at the upper right of this page.

  • I do have a Deskjet 5740 with all lights fast blinking. Unplug and plugin again does not help.

    I do have a Deskjet 5740 with all lights fast blinking. Unplug and plugin again does not help. That's already it. I would like to know if anybody can tell me if the means the machine is completely broken. Or if this is a seldom failure situation that can be solved somehow. Please don't overlook that it's  f a s t  blinking.

    I wanted this question  one more day on the first site.

  • Was doing the latest os update on my iphone 4 the update was interuptedby a bad internet connection and now the screen is stuck on an image of the itunes logo with a pic of the usb cord and an arrow in between HELP!!!n

    was doing the latest os update on my iphone 4 the update was interuptedby a bad internet connection and now the screen is stuck on an image of the itunes logo with a pic of the usb cord and an arrow in between HELP!!!n

    or you can try this
    http://www.iclarified.com/entry/index.php?enid=1034

  • Combo box with multiple lines

    I have a need to create a combo box that can display multiple lines how can i do that on a pdf

    Add multiple items.

  • Combo Box with duplicate data

    Hello All,
    I am creating a form with a combo box but the data from the table is duplicating.  Can anyone provide guidance on how to make the combo box only display only two choices of the data?  For example, when the box is selected the drop down list
    will have multiple/group of  'Yes' and 'No'.  It appears that everytime a record is added to the table, it gets duplicated.  I think I'm overlooking something from working long on this and it maybe something simple/obvious.   Any
    help would be appreciated, thanks.
    Evin

    As Bruce said you can use the DISTINCT predicate to suppress duplicate rows, but if you are getting duplicates in a combo box's list it suggests that you are querying the wrong table as the Control's RowSource property.  If we take a simple example
    of a combo box to list states, then the following would return duplicates of the table contains rows for two or more cities in the same state:
    SELECT State
    FROM Cities
    ORDER BY State;
    You could suppress the duplicates with:
    SELECT DISTINCT State
    FROM Cities
    ORDER BY State;
    but the correct solution would be:
    SELECT State
    FROM States
    ORDER BY State;
    i.e.  in the Cities table State is a foreign key column referencing the primary key of States.  You might ask why have a States table at all as the values are already in Cities?  The answer is that by having a States table you can enforce referential
    integrity in the relationship between Cities and States, preventing the insertion of invalid State values into Cities.  Without protecting the integrity of the database in this way errors in data entry will sooner or later occur (Murphy's Law is infallible
    in this respect!).  I have personal experience which is testament to this, having once found three versions of my own name as author in a table of references to technical articles in my own field of work.  As far as the database is concerned this
    makes me three separate people!  The table should have referenced the key of an Authors table of course.
    Ken Sheridan, Stafford, England

  • I have NO scripting experience but am attempting to create "cascading combo box" with two boxes.

    I have copied and edited to the best of my ability several options but keep getting errors, mostly illegal character on line...
    I do not have LifeCycle, merely Adobe Acrobat IX (and a trial version of Acrobat XI PRO) and the extent of my knowledge ends at placing fields, text, etc. . .
    The scenario is as follows:
    On the document, there are two combo boxes
    1- "DeptName"
    2- "Position"
    The goal is to be able to select one of 15 different departments, and based on that selection, choose from between 2 to 15 different positions for that corresponding department.
    Below is what I was hopeful would work, but alas - FAIL!!
    If anyone could assist it would be GREATLY APPRECIATED!
    myDeptNameValues =
    "ADMINISTRATION – RSADMN (8171)",
    "BEVERAGE – RSBEV (8174)",
    "CATERING – RCCAT (8959)",
    "CLUB – RSCLB (8174)",
    "CONCESSIONS – RCCON (8961)",
    "CONCESSIONS – RSCON (8173)",
    "CULINARY – RSKIT (8177)",
    "FACILITIES – RSFAC (6925)",
    "RETAIL – RSRET (8175)",
    "SUITES – RSSTE (8177)",
    "VENDING – RSVND (8173)",
    "WAREHOUSE – RSWHS (8173)"
    this.getField("DeptName").setItems(myDeptNameValues);
    var DeptData =
    ADMINISTRATION – RSADMN (8171):["Teller","Security"],
    BEVERAGE – RSBEV (8174):["Bartender","Barback"],
    CATERING – RCCAT (8959):["Banquet Server",”Banquet Captain"],
    CLUB – RSCLB (8174):["Cashier","Counter","Cook","In Seat Server","Runner","Stand Manager"],
    CONCESSIONS – RCCON (8961):["Counter","Cashier","Cook","Runner","Beer Attendant/SMC","Stand Lead","Supervisor"],
    CONCESSIONS – RSCON (8173):["Counter","Cashier","Cook","Runner","Beer Attendant/SMC","Stand Lead","Supervisor"],
    CULINARY – RSKIT (8177):["Cook 1 – Entry Level","Cook 2 – Advanced Level","Cook 3 – Lead Cook","Kitchen Supervisor","Steward"],
    FACILITIES – RSFAC (6925):["Lead – Blower/Press","Cleaning Services Worker"],
    RETAIL – RSRET (8175):["Warehouse","Supervisor","Warehouse Supervisor","Vendors/Hawkers","Senior Supervisor","Associates"],
    SUITES – RSSTE (8177):["Suite Attendant","Ice Cream Cart Attendant","Runner","ReOrder Clerk","Suite Captain","Pantry Supervisor"],
    VENDING – RSVND (8173):["Vendor","Vendor Filler","Alcohol Compliance Supervisor","Auditor","Level Supervisor","Senior Supervisor"],
    WAREHOUSE – RSWHS (8173):["Runner","Supervisor"]
    function SetFieldValues(cDeptName)
    this.getField("Position").setItems(DeptData[cDeptName]);
    The above code was placed in the document script.  Within the format area of the "DeptName" box, I have the following code placed in the keystroke script.
    if( event.willCommit )
    if(event.value == "")
    this.getField("box2").clearItems();
    else
    SetFieldValues(event.value);
    I have spent the past four days, more than 18 hours in the last two alone trying to nail this down and I can't explain how completely defeated I feel, not to mention frustrated.
    Again, thanks for your help!!

    I suppose I am not meant to figure this out.  I am trying my absolute hardest to accomplish compiling this document without having to resort to asking someone to do it for me as I have noticed in a few other threads, but it just seems to get more frustrating.  I have accomplished the first thing I set out to do and I completely appreciate your assistance with that.  My issue now is that i have other text fields I want to automatically fill based on the selection of the very same DeptName combo box.  I can make the cascading/dependent box work with the initial DeptName box, or all the additional text fields with the DeptName box, but cannot seem to accomplish having them work together.  I have been working daily, reading blogs/forums, watching videos all in an effort to complete this before it's needed on Feb. 2. 
    Is it possible to make 7 text fields and a combo box(B) fill based on the selection of a separate combo box (A), and then have 5 more text fields automatically fill based on the selection from the secondary box (B)?  I can make it all happen individually, meaning only the text fields for one box or the combo box (A to b) but not in conjunction.
    http://1drv.ms/1GDpESS
    This is the file, if it helps to see what I'm hoping to accomplish

  • Filtering of Data through Combo Box with chart drill down Option.

    Hey Guys,
    I need to ask one thing about combo box filtering option, i want to filter my data like country, agent, customer and in the end material. I have achieved this through filter component but the thing which bother me is that if i select the specific customer in filter option it directly give's input to other filter's which i don't want. So the alternate is combo box but the thing which is creating problem is that if i filter my data through combo box it doesn't give any option for the chart filtering. For more convenience i am attaching my spreadsheet data which i want to filter.  please help me in this matter.
    Thanks & Best Regards,
    Hassan Ali.
    Sample Is Below::
    Country
    Customer
    Material
    Austria
    David
       Mat 1
    Austria
    Simon
       Mat 2
    China
    XYI jo
       Mat 2
    China
    CHU pa
       Mat 4
    India
    Suresh
       Mat 1
    India
    Ramesh
       Mat 5
    Sales Quantity
    Export Sales
    300.000 FT2
    1,631,020.77 PKR
    600.000 FT2
    3,108,107.67 PKR
    600.000 FT2
    11,917,131.08 PKR
    200.000 FT2
    8,679,817.14 PKR
    760.000 FT2
    8,059,453.23 PKR
    790.000 FT2
    1,727,072.16 PKR

    Nothing to do with excel file, just the logic with combo box.

  • Can I have a blank field on my document when using a combo box with a drop down list in Word 2011 for Mac?

    I am creating a drop down list using a combo box in the Developer tab. Once I protect my document I want the field to remain empty and not show any of the items on my drop down list. Is there a way to do this? Currently it shows one of the items on my list.
    Thanks

    Paul's answer is correct.
    Since this is a Word IT forum for Windows, in the future you should use the
    answers.microsoft.com forum. It specializes in Word for the Mac. BTW - Paul stops by there also, so you'll still get his advice from there. :-)
    Kind Regards, Rich ... http://greatcirclelearning.com

  • I need a combo box with 4 values to choose from which will populate a text box on the form with text related to each combo box selection

    For example:
    Combo box choices:
    apple
    tomato
    squash
    Pumpkin
    The text box depending on the selection above would state the color:
    Green        (if Apple was chosen from the combo box
    Red           (if Tomato was chosen from the combo box
    Yellow       (if Squash was chosen from the combo box
    Orange      (if Pumpkin was chosen from the combo box
    I am very new at this and have spent hours looking for an answer.  Thank to anyone in advance who can help!

    Place each value as the export value of the options in the combo-box and then use this code as the text field's custom calculation script:
    event.value = this.getField("ComboBox Name").value;

  • Combo box with a little twist?

    Hi everyone,
    Umm, i want to make a some drop boxes or combo boxes where if the user choose some option, than in the next combo boxes that option will not appear. Can I do that?
    How?
    Thanks for the help, sorry if this question had been asked, and especially sorry for the terrible english.
    Bence

    OK, I see now.
    So let's say the first box is called Combo1 and the second Combo2. You can add this code as the validate event of Combo1:
    var items = [];
    for (var i=0; i<event.target.numItems; i++) {
         if (event.value!=event.target.getItemAt(i,false))
             items.push(event.target.getItemAt(i,false));
    getField("Combo2").setItems(items);

Maybe you are looking for

  • How to update boot file for SG200-26P

    I am new at this, and need assist in updating the sx200_boot-13506.rfb file into my switch.  I have downloaded the Boot and FW files to my computer which is connected to the switch, and updated the fw file by using the Upgrade page via HPPT/HP\TTPS a

  • I suddenly lost search/url bar in Safari (Yosemite). How do I get it back?

    I don;t know what happened. I was adding items to Favorites and suddenly realize my address/search bar had disappeared. I can only access previously bookmarked pages now as there is no way to type in a new URL or search???

  • Export to HTML Option in 7

    I have just started using Captivate 7. In 5.5, when you published to swf, you could deselect the "Export To HTML" option to prevent Captivate from making HTML, js, and css files. Since my authoring tool does not require these files with swfs, I alway

  • Data determination in access

    hi gurus, can you give me steps on how to setup a data determination in access? i think data determination for sales deals is one of the simplest way. can you help me? thanks, paul

  • 1st generation Ipod, wi-fi setting gray,no wi-fi

    In settings, my Wi-Fi icon is gray, and in General-about, the Wi-Fi address is N/A. So I can not enter a address.