I want to filter my portal based on three criteria (the contact's position - Chairman, CEO, etc.) I used the "or" operator, but it does not work. Tried and If function, but failed again.
Can't say without more detail.
I suggest copy and pasting the expressions that you tried to use and also describing the relationship between the portal's Tutorial: What are Table Occurrences? and your layout's table occurrence.
The portal's TO is listed in "Show Related Records from" in Portal Setup.... The Layout's TO is listed in Show Records From in Layout Setup... How these two TO's are linked in Manage | Database | Relationships is key to how your portal filter then filters that set of related records further to produce the records (if any) shown in your filtered portal.
If I apply no filtering, then all the data appears. Or, if I just use one criteria, then that criteria works. It is only when I use multiple criteria that the filtering not work. But, to answer your question ...
1) ClientsContacts::position = "Campaign Manager" or "CEO" or "President" or "Chairman"
2) If ( ClientsContacts::position = "Campaign Manager" ; "Campaign Manager" ;
If ( ClientsContacts::position = "Campaign Manager" ; "Campaign Manager" ;
If ( ClientsContacts::position = "CEO" ; "CEO" ;
If ( ClientsContacts::position = "President" ; "President" ;
If ( ClientsContacts::position = "Chairman" ; "Chairman" ;
That doesn't answer all my questions, but should be sufficient to answer yours.
Your portal filter expression is using incorrect syntax. It should read:
ClientsContacts::position = "Campaign Manager" or
ClientsContacts::position = "CEO" or
ClientsContacts::position ="President" or
You could also use a text function to get a simpler expression such as:
PatternCount ( "Campaign Manager CEO President Chairman" ; ClientsContacts::position )
If all of criteria are empty..... how do you get the portal to show no results?...until you choose one?
What if you want to only see results that match two of the criteria?
Retrieving data ...