Expand my Community achievements bar.

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
Former Community Member

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

4 Replies

Avatar

Former Community Member

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
Former Community Member

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)

_

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----