Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

if dropdown value equals this then dropdown2 value equals this and var equals numericfield * drop3

Avatar

Level 3

Hello Everyone,

I am trying to figure out how to do the following:

dropdown1 value (value meaning the textual value and not numerical value) and if selected then var1 = numericfield1.

I thought i could use:

(Using javascript)

if(dropdown1.rawValue == "text")

{

     var1 = numericfield1.rawValue;

}

Any help is appreciated.  I would upload the form but currently I cannot as there is an issue with uploads it looks like so I am placing it on our dev server and here is the link to download the form:

http://www.shingleme.com/CostWorkSheetTest.pdf

Justin

1 Accepted Solution

Avatar

Correct answer by
Level 10

I thnk I see the issue ...The WCSMMonth is not a field but just text and hence it has no rawValue. Is it supposed to be a field?

Paul

View solution in original post

0 Replies

Avatar

Level 10

had a look at your form and was able to get rid of one line but found that the wMonth was not defined. I do not know if that is a field or a variable that you were trying to set earlier. If I assign a value to it then it works just fine. See my updated sample attached.

Paul

Avatar

Level 3

Hmmmmmm then I need to figure out why inside the switch statement code block wMonth isn't taking the value of wCSMMonth then.  If i can figure this out I can figure out the math from there.

Here is the code block:

switch

(xfa.event.newText)

{

case "College Square Mall":

packDes1.rawValue

= null;

packDes1.clearItems();

packDes1.addItem("Website Monthly Contract");

packDes1.addItem("Website Annual Contract");

packDes1.addItem("Eblast Monthly Contract");

packDes1.addItem("Eblast Annual Contract");

packDes1.addItem("Combo Web/Eblast Monthly Contract");

packDes1.addItem("Combo Web/Eblast Annual Contract");

packDes1.addItem("Website Portfolio Monthly Contract");

packDes1.addItem("Website Portfolio Annual Contract");

packDes1.addItem("Eblast Portfolio Monthly Contract");

packDes1.addItem("Eblast Portfolio Annual Contract");

packDes1.addItem("Web/Eblast Portfolio Monthly Contract");

packDes1.addItem("Web/Eblast Portfolio Annual Contract");

var wMonth = wCSMMonth.rawValue;

var wYear = wCSMYear.rawValue;

var eMonth = eCSMMonth.rawValue;

var eYear = eCSMYear.rawValue;

var cMonth = cCSMMonth.rawValue;

var cYear = cCSMYear.rawValue;

var packDisM = packDisMonth.rawValue;

var packDisY = packDisYear.rawValue;

break;

}

Avatar

Correct answer by
Level 10

I thnk I see the issue ...The WCSMMonth is not a field but just text and hence it has no rawValue. Is it supposed to be a field?

Paul

Avatar

Level 3

AAAAAAAAAAAAAAAAAAAAAAAA ha!!!!  I didn't create this particular form and should've looked.  Geez  I can't believe I missed that 🙂 Good catch my good man.  Thank you very much.  Things should get much easier going forward now.

Justin (aka not very observant)

_