Expand my Community achievements bar.

SOLVED

adding dropdown categories to script

Avatar

Level 2

Hi ,

Cant seem to find the easy answer.

I have a drop down that when one of the categories (Limbo) is selected it clears out other data in the form.  What I would like to do now is add Limbo 1, Limbo 2, Limbo3..etc to the drop down and have those categories do the same thing as Limbo.

Here is a partial of the script with the Limbo category.

I just don't know had to add in the Limbo 1, Limbo2... to the script

Any help would be great!!

In the INITIALIZE:

if(this.rawValue == "Limbo")

{

    for(var i=0;i<someArray.length;i++)

    {

        if(i == 3 || i == 7 || i == 13)

        {

            xfa.resolveNode(someArray[i]+".NAR").rawValue = 0;

            for(var j=1;j<8;j++)

            {

                xfa.resolveNode(someArray[i]+".rating"+j).rawValue = 0;

                xfa.resolveNode(someArray[i]+".rating"+j).access = "protected";

            }

        }else{

            for(var j=1;j<9;j++)

            {  

                if(j<8)

                {

                    xfa.resolveNode(someArray[i]+".rating"+j).rawValue = 0;

                    xfa.resolveNode(someArray[i]+".rating"+j).access = "protected";

                }else{

                    xfa.resolveNode(someArray[i]+".ratingNO").rawValue = 0;

                    xfa.resolveNode(someArray[i]+".ratingNO").access = "protected";

                }  

            }

        }

       

    }

}

1 Accepted Solution

Avatar

Correct answer by
Level 7

If Limbo1, Limbo2 etc are in the same dropdown and you want them to do the same thing then just add them to if statement:

if(this.rawValue == "Limbo" || this.rawValue == "Limbo 1" || this.rawValue == "Limbo 2")


View solution in original post

1 Reply

Avatar

Correct answer by
Level 7

If Limbo1, Limbo2 etc are in the same dropdown and you want them to do the same thing then just add them to if statement:

if(this.rawValue == "Limbo" || this.rawValue == "Limbo 1" || this.rawValue == "Limbo 2")