If both check boxes are selected, the value of the field does not equal "customers" and it does not equal "suppliers" and thus your filter expression does not produce the results you want. When both are selected. both values are stored in the field separated by a return.
To use your filter expression, you can use FilterValues:
Not IsEmpty ( FilterValues ( LayoutTable::CompanyType ; "Suppliers" ) )
Please note that FilterValues, like all functions that end with "values", always tacks a return onto the end of any text that it returns so we use IsEmpty instead of comparing the value returned to "Suppliers" or "customers".
There is, however, another approach that you might want to consider:
Use CompanyType as one of your match fields in this relationship. Return separated lists of values such as are produced by check box formatted fields, work as a kind of "OR" matching. WIthout using any portal, you'd get your set of portal records where the companyType matches any one of the values listed inside the field.
What is your exact portal filter expression?
Thank you PhilModJunk! the FilterValues works!
i also tried changing the = sign to a not equal sign and change the Suppliers to Customers for the supplier and it showed the Supplier, why is that? (see below)
For the Portal to show only Suppliers
COMPANIES::company_type (not equal sign here) "Customers" <--- this works, why is that?
i used COMPANIES::company_type = "Suppliers" for suppliers / "Customers" for customers
I don't think that (expression with "not equals" ) will work for records marked as both suppliers and customers.