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

Help with statement

Avatar

Level 7

is it something wrong with this statement?

Action is a Drop Down List

D1  is a Drop Down List

forms is radio button

BudgetedButtonList is a radio button

if ((form1.Page1.Section_A.EmployeeInfo.Row1.Action.rawValue==1)||

(form1.Page1.Section_A.EmployeeInfo.Row1.Action.rawValue==3)||

(form1.Page1.Section_A.EmployeeInfo.Row1.Action.rawValue==4)

&& ((form1.Page1.Section_A.All.D1.rawValue==2)||(form1.Page1.Section_A.All.D1.rawValue==4))

)

{

Mail_HR.execEvent("click");///Email to xxx@xxx.org

}

else if ((form1.Page1.Section_A.All.D1.rawValue==2)||

(form1.Page1.Section_A.All.D1.rawValue==4)

&&

((form1.Page1.SectionBA_TOP.forms.rawValue==1) ||

(form1.Page1.NEWPOSITION_sub.EmpPosition.BudgetedList_SUB.BudgetedButtonList.rawValue==2))

)

{

Mail_MN.execEvent("click");////Email to www@xxx.org

}

2 Replies

Avatar

Level 10

I think your brackets are a little out of whack - not quite in the right place a couple too many. It can help to use a programmer's editor like Notepad++ to check matching brackets, etc.

Try the following, you'll have to reformat it but I do it this way sometimes so it's easier to see the relationships needed:

if

(

          (

               form1.Page1.Section_A.EmployeeInfo.Row1.Action.rawValue == 1

               ||

               form1.Page1.Section_A.EmployeeInfo.Row1.Action.rawValue == 3

               ||

               form1.Page1.Section_A.EmployeeInfo.Row1.Action.rawValue == 4

          )

          &&

          (

               form1.Page1.Section_A.All.D1.rawValue == 2

               ||

               form1.Page1.Section_A.All.D1.rawValue == 4

          )

)

{

          Mail_HR.execEvent("click");

}

else if

(

          (

               form1.Page1.Section_A.All.D1.rawValue == 2

               ||

               form1.Page1.Section_A.All.D1.rawValue == 4

          )

          &&

          (

               form1.Page1.SectionBA_TOP.forms.rawValue == 1

               ||

               form1.Page1.NEWPOSITION_sub.EmpPosition.BudgetedList_SUB.BudgetedButt onList.rawValue == 2

          )

)

{

          Mail_MN.execEvent("click");

}