Help with multiple checkboxes
I'm having a bit of trouble with some checkboxes that I am using. I have 3 checkboxes on my layout, each checkbox is for a matching field. I need to figure out the script to run that will check to see if any of the checkboxes are selected, and if any are selected, then the navigation must move to the last field in the portal.
I tried running a script trigger on object enter that has an If statement in it that I thought would check all 3 boxes, but it just is not working properly. I think I am getting confused between 'and', 'or' and '&'. I tried all 3 and well none of them worked the way I needed them to work. I thought that with the 'and' I could have an if statement like,
If [ fieldA = "1" and fieldB = "1" and fieldC = "1"]
show custom dialog ....
Set Field [""]
Then set that as an OnObjectEnter script trigger, but alas, no joy. Then I tried replacing the 'and' with '&' and that also didn't really help and I also tried replacing it with 'or' and the = with not= (well the sign in the calculation box for not =), and still no joy.
It seems to work fine the very first time I run the script, but if I select the same box again, or if I select one of the other boxes, sometimes it works and sometimes it doesn't. I had a look in Data Viewer and it seems to activate the checkbox the moment I press on it and I think that is where I am going wrong.
In another solution I worked on a few months ago I had a similar issue and what I ended up doing was having a hidden field in the portal which would get a value if any of the checkboxes are selected, and then the OnObjectEnter script trigger would check that field and go according to that. I am about to do that again, but thought maybe there is an easier way to do this. Or would it be easier to use the hidden field option, like I did in a previous solution I worked on?
Thanx for any advice