If you build the portal filter calculation correctly it will work.
Without details of what you have done we really can't provide an accurate answer.
What values are you selecting in your check box formatted field?
You have two basic approaches depending on what type of criteria you are selecting.
If possible, the method that will update your portal the quickest is to make the check box field a match field in the relationship. If you select two values in the check box field, any records that match to one or the other will appear in the portal. This does, however make assumptions about your data that may not be the case and it requires that at least one matching value exist in the field.
Set up your portal filter expression. This is more flexible, but you can encounter delays if your portal has to filter large groups of related records. Use this type of expression:
IsEmpty ( YourTable::CheckBoxField ) or
Not IsEmpty ( FilterValues ( "Value1" ; YourTable::CheckboxField ) or
Not IsEmpty ( FilterValues ( "Value2" ; YourTable::CheckboxField )
Note that with this expression, leaving the field empty includes all related records where leaving the field empty for the previous option leaves the portal empty.
So far it is a basic portal with a filter from a check box menu that has
Set an appt
I want to be Able to check a box that would show X-Attended X-set an appt
and it would show all the portal records that have this in the status.
Right now the portal is only showing one selection so if I click Attended it shows people that attended but I select another it shows nothing.
I hope that is more explanatory.
I actually can't tell if you've put it in the right place from your screen shots. If you opened portal setup and selected the option for a portal filter to get that first specify calculation dialog, then you have put it in the correct place.
After making a change to the check box field, try entering layout mode, then returning to Browse mode to see if the portal update to show only records passing your filter. If that works, it's not an issue with the portal filter, but with getting it to update after changing the portal criteria. (This is something so familiar, that I forgot to mention it here.)
To get the portal to update, if the check box field is NOT global, just click a blank area of the layout to commit records or set up the OnObjectModifyTrigger to do a commit records script step.
If the field is global, use Refresh Window [Flush Cached Join Results] or try Refresh Portal (give the portal an object name). I'm not sure that the second option will work and it may depend on the version of FileMaker whether it works or is even available, but try and see for yourself.
There is another option where you set up the global field as part of the relationship, but using the X instead of = operator and then using this script step to update the filtered portal:
Set Field [ YourTable::CheckBoxField ; YourTable::checkBoxField]
The combination of Cartesian Join (x operator) and setting the field to itself will force the portal to update without doing a full refresh with the Flush option--which can add to the overall "load" on your server if a lot of people do this all the time.
Thank you for your help. So I have tried all three of what you described and I must be doing something wrong somewhere because I can not get it to work. I am going back to my original document right now to start where I left off. With that said I have the portal filtering by 1 selection. I entered in the code you sent in the main portal record filter area. Could I have entered something wrong?
I guess my question would be what is the best Cours of action from here. The field I am using to filter is not global. Would it help to do so?
Can you post a cloned file with some sample data?
PatternCount ( MAIN MENU Event Information::FilterAttendees ; MAIN MENU Attendee information::status ) > 0
and a refresh portal and a "true" if empty !!
things I did:
Changed the "filter" to being a global field
Named your portal
added the filter condition to it
created a script
attached that script to onModify trigger on your "filter"
EVENT ROI.fmp12.zip 274.1 K
That worked perfect where do I put the refresh script?
Thank you. This works perfect as well.
I appreciate all your help very very much.
One last thing if I wanted to make it so that nothing is check and it would display all records how would I do that?