Your problem is likely coming from the fact that checkbox lists appear in the order in which they are checked. In other words, if the user chooses "Member", then "Candidate", the list will look like this:
But if the user chooses Candidate first, you get:
In order to get all the possible permutations, you're going to have a mess, trying to use the "=" qualifier. Instead, use the FilterValues ( ) function to determine if.a given value appears in the list. Example:
Case ( not IsEmpty ( FilterValues ( gBtnMemOrCan ; "Member" ))
This should be much more predictable.
My confusion stems from the fact that INACTIVE / Candidate Other works just fine.
Plus, in the Inactive / Member Candidate section of code, Candidate Member works but Member Candidate does NOT.
Any ideas on that?
Did you try the solution that was given to you?
Did you try it, before asking another question?
Aren't "Member", "Candidate" and "Other" mutually exclusive ? Active and Inactive sure are => use radio buttons instead of checkboxes.
It's entirely possible that a stray character has worked itself into the field. Since a checkbox set is merely a text field with some formatting laid over the top, you don't always see everything. There could be a stray carriage return or other character that is interfering with your "=" operator.
That's why it's valuable to learn the various "values" functions and use them instead.
Not really. My goal is to allow the user to user whatever combination of: Active / Inactive and Member, Candidate and/or Other that the desire. This works.... except for Inactive Member Candidate.
Inactive Candidate Member works fine.
I don't see any space for 'errant' characters after the = sign (see highlighted code above) and I have retyped that line more times than I can remember; all with the same inability to work.....
I like this idea and will give it a try. (I suspect it will work)
However, the solution / code as written should also work. I find it perplexing as to why it does not work.
While I greatly appreciate the 'solution' given, getting the code to work is only part of my purpose.
I also need to know WHY the existing code doesn't work.
Errant characters in the field, not the code. You can type text into a checkbox field that isn't part of the value list. If the field is:
or ... (you get the idea)
then your "=" clause in the code will not work.
Please, just try using FilterValues. It's what it's there for.
Seems like you are on to something.
But, I don't see how 'errant characters' could get entered in the
global gBtnMemOrCan field (for example). It is just a global text field with no auto enter or auto anything characteristics...
Especially since Active - Candidate Member works and
Active - Member Candidate works.... for example.
The working combinations use the same fields as the non working combinations...
If I'm reading what you are trying to do...
It doesn't work because:
Given: Candidate¶Member¶ <> ( does not equal ) Member¶Candidate¶
So when the filter calc fires, it looks to see if "Candidate¶Member¶" exists. Since the "Given" is true, a record that is "Member¶Candidate¶" does NOT match.
Checkboxes will add onto the list as you check boxes. So in your case, the order matters. It isn't quite the same as how the relationship itself filters.
You had your answer in the first sentence of the first reply.
It would probably be a good idea for you to place a copy of the checkbox field on a layout, but set it up to display as a standard text field. Click the checkboxes in the checkbox field. Confirm for yourself the observations of sentence 1 of reply 1.
I think you need to take what you’ve been given here and go back and do some investigating. Check the fields on both sides of the relationship. Make sure there are no errant characters (as Bruce recommends, take the checkbox formatting off the field and see what’s actually there).
We’re here to provide guidance and make suggestions. If you need dedicated troubleshooting of your specific solution, I suggest you hire a consultant.