4 Replies Latest reply on May 10, 2012 1:34 PM by Dean Bruyere

    if then statement is what i believe i may need

    Dean Bruyere

      I have a drop down list with several items in it, i would like another textfield to display an universal number if i select one of the specific items in my dropdown list,, I am really new at this and learning

        • 1. Re: if then statement is what i believe i may need
          paulk07 Level 3

          You can control for each item.  Please provide what you would want in the droplist and the values to display and I'll build a quick sample

          • 2. Re: if then statement is what i believe i may need
            Dean Bruyere Level 1

            I realize now some of my issues, i have a globy file which contains a preset number of fields in it,each preset field contains a certain unique number associated with it...when i select from a previous dropdown list  that contains other fields the values in each of those fields will change from its unique number to a common number.....

             

            The first drop list contains the following items

             

            set, consolidated, integrated,  transitional, flex, flexible transfer and a few others, The values only change to one other value doesnt matter which i select.

             

            The second dropdown list is the globy file which contains the following

            function globya()

            {

            switch  (sNewSel)

            {

            case "Aboriginal Diabetes Initiative":

            AC = "KC01"

            GL = "76721"

            break;

            }

             

            there are many more items listed and i didnt want to add them here but the only item I would like to change is the GL to an universal number which would be 76709

             

            I hope this helps explain otherwise I could send you the complete form that I have, thanx in advance

            • 3. Re: if then statement is what i believe i may need
              paulk07 Level 3

              The event is set to "initialize" and this is javascript on the droplist object:

              Assuming you have textfields named AC & GL.

               

              var sNewSel = this.rawValue;

               

              switch (sNewSel)

              {

                case "Aboriginal Diabetes Initiative":

                  xfa.form.form1.BodyPage1.AC.rawValue="KC01";

                  xfa.form.form1.BodyPage1.GL.rawValue="76721";

                  break;

              }

               

              Copy the script and add your other options between the brackets

              • 4. Re: if then statement is what i believe i may need
                Dean Bruyere Level 1

                thanx for your help but i  need to get away from this for a while, im a wee bit frustrated and it doesnt seem to work. Basically when i select from "set" and consolidated in the first droplist the values in the globy file remain the same...its when i select transitonal, integrated flex and flexible transfer I would like the values to change in the globy file to change from the default gl to a new number which is always 76709