Avatar

Correct answer by
Level 5

Hi ,

It looks like you have some misplaced brackets in your code, and you are using a single '=' sign, this assigns a value to the variable and is always true, whereas you need to use '==' to compare values, try the code below

I have spaced it out a bit to make sure I got the sections correct.

if(this.rawValue == "text1")

{

    PartNum.rawValue = Num1

}

else if (this.rawValue == "text2")

{

    PartNum.rawValue = Num2

}

else if (this.rawValue == "text3")

{

    PartNum.rawValue = Num3

}

else if (this.rawValue == "text4")

{

    PartNum.rawValue = Num4

}

else

{

    PartNum.rawValue = "";

};

Hope this helps

Malcolm

View solution in original post