I must be missing one critical comma or semicolon...
I have a form that I'm trying to validate before going to the next screen by disabling a button.
At the top of my form is a toggle that asks if certain characters are in an email address. If the toggle indicates false, and any of the following icons show an "x" mark (Cancel), then make the button DisplayMode.Disabled.
If, instead of false, the answer on the toggle is true, then check the following icons (some different; some the same as the first condition) and if any of the icons show an x mark, then DisplayMode.Disabled otherwise, make the DisplayMode.Edit.
I can get each of the statements to work perfectly as a standalone so I know the conditions are right and my fields filled in correctly. But, I can't seem to figure out the nomenclature to get this statement to work for both conditions when I put them together. I thought I had it working and when I returned -- not so much!
If(
tgl_Non_TFS_Email_Address.Value = false And
ico_Non_TFS_Email_Address.Icon = Icon.Cancel Or
ico_Non_TFS_Email_Office_Location.Icon = Icon.Cancel Or
ico_First_Name.Icon = Icon.Cancel Or
ico_Last_Name.Icon = Icon.Cancel Or
ico_Group.Icon = Icon.Cancel Or
ico_BRG.Icon = Icon.Cancel Or
ico_Role.Icon = Icon.Cancel Or
ico_Chapter.Icon = Icon.Cancel,
DisplayMode.Disabled,
If(
tgl_Non_TFS_Email_Address.Value = true And
ico_Thermo_Email_Name.Icon = Icon.Cancel Or
ico_BRG.Icon = Icon.Cancel Or
ico_Role.Icon = Icon.Cancel Or ico_Chapter.Icon = Icon.Cancel,
DisplayMode.Disabled,
DisplayMode.Edit
))
Thanks very much for your help and consideration.