A portal is basically just a "window" to display the child records of your relationship. For example, lets say you have a table that stores company information and another table that stores employee information. For the sake of this example lets just assume that you are not storing any history etc so its a straight one to many relationship ( one company, many employees ).
Now once you have a relationship created between the two TOs, perhaps based on CompanyID if you just put a related employee field on the Company layout, it will return the first related record's information. You can display all the related records by using a portal.
So if you are on a layout based off a TO of the company, you can put a portal that displays all the related employees. Now if you are browsing Company ABC's record, you shoudl see all the related employees.
Portals are only as good as their relationship that it is based on.
Ok, really thanks Mr_Vodka.
Now, I am a step further. I am trying to create multiple filter portal. That is, I create one global field and an option field. If I choose A, filemaker search what I write in the global field in the codes, if I choose B, filemaker search in the names.
I thought that two global calculating field should serve, one to be related to the codes and the other one to the names. The two calculating field have this formula:
case(optionbutton="A"; If(IsEmpty(gFilter_txt); “0¶z”; gFilter_txt & ¶ & gFilter_txt
case(optionbutton="B"; If(IsEmpty(gFilter_txt); “0¶z”; gFilter_txt & ¶ & gFilter_txt
Of course, this doesn't work...