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

Help with script

Avatar

Level 7

What wrong with my script( does not executo on click event):

if (form1.Total_Assessment_Sub.Total_Performance.rawValue==0)

{form1.Total_Assessment_Sub.AssessmentValueTotal.rawValue="";

}

else if ( form1.Total_Assessment_Sub.Total_Performance.rawValue >=4.5)

{ form1.Total_Assessment_Sub.AssessmentValueTotal.rawValue="OUTSTANDING";

}

else

{if (form1.Total_Assessment_Sub.Total_Performance.rawValue >=3.5&&Total_Behaviours.rawValue<4.5)

{form1.Total_Assessment_Sub.AssessmentValueTotal.rawValue="EXCEEDS EXPECTATIONS";

}

else

{if (form1.Total_Assessment_Sub.Total_Performance.rawValue >=2.5&&Total_Behaviours.rawValue<3.5)

{form1.Total_Assessment_Sub.AssessmentValueTotal.rawValue="MEETS EXPECTATIONS";

}

else

{ if (form1.Total_Assessment_Sub.Total_Performance.rawValue >=1.5&&Total_Behaviours.rawValue<2.5)

{form1.Total_Assessment_Sub.AssessmentValueTotal.rawValue="NEEDS IMPROVEMENT";

}

else

{ if (form1.Total_Assessment_Sub.Total_Performance.rawValue<1.5&&Total_Behaviours.rawValue>0)

{ form1.Total_Assessment_Sub.AssessmentValueTotal.rawValue="DOES NOT MEET EXPECTATIONS";

}

                }      

            }

        }

    }  

1 Accepted Solution

Avatar

Correct answer by
Level 5

You start with the wrong code in line 7 with the second else if statement

With this line EVERY else if statment and the curly brackets are wrong. You have some curly brackets too much.

Wrong:

else

{if (form1.Total_Assessment_Sub.Total_Performance.rawValue >=3.5&&Total_Behaviours.rawValue<4.5)

{form1.Total_Assessment_Sub.AssessmentValueTotal.rawValue="EXCEEDS EXPECTATIONS";

}

Right:

else if (form1.Total_Assessment_Sub.Total_Performance.rawValue >=3.5&&Total_Behaviours.rawValue<4.5)

{

    form1.Total_Assessment_Sub.AssessmentValueTotal.rawValue="EXCEEDS EXPECTATIONS";

}

Kind regards Mandy

View solution in original post

0 Replies

Avatar

Level 4

Hey there,

first thing i see is that  you've got

else { if (...) {}

should be

else if (...) {}

Avatar

Correct answer by
Level 5

You start with the wrong code in line 7 with the second else if statement

With this line EVERY else if statment and the curly brackets are wrong. You have some curly brackets too much.

Wrong:

else

{if (form1.Total_Assessment_Sub.Total_Performance.rawValue >=3.5&&Total_Behaviours.rawValue<4.5)

{form1.Total_Assessment_Sub.AssessmentValueTotal.rawValue="EXCEEDS EXPECTATIONS";

}

Right:

else if (form1.Total_Assessment_Sub.Total_Performance.rawValue >=3.5&&Total_Behaviours.rawValue<4.5)

{

    form1.Total_Assessment_Sub.AssessmentValueTotal.rawValue="EXCEEDS EXPECTATIONS";

}

Kind regards Mandy