"globals::searname x student::name"
Why is it a cartestian_join "x" and not an equal relation "="?
X, that will bring up everything. (I'm not sure how it works with "globals::type=student::type")
If you need the X, maybe create another TO and have the calculation depend on that relationship.
It is actually a mistry to me how the x is working.
If I try the = then I have to type the whole name exactly otherwise I do not get any thing.
With the x I get all names containing the string of charcaters I typed for example.
I type part time for type and the characters GEO for searcname then I press enter which runs a script to commit
I get all part time students like George, Brown Grogina, Smith Cathy, Georgette and so on.
It sounds like you have a portal filter that matches the text typed into the search field against the name field in the portal. This can be set up to support partial text matching.
In which case, you need the total related records that make it through the portal filter.
Define a Summary field in the student table. Set it to "count" a field that is never empty such as Student::Name.
Make a copy of your existing portal. Use portal setup to reduce the number of rows to 1. Put this summary field inside the one row portal it will show the number of matching names that appear in the portal.
Yes I do remeber now that I am using a portal filter and this is how the cartezian relation is working.
I treid the portal copy with a summary field and it works fine as a display but what if I want to get this count and use it in calculation.
I really want to say that if the number of matches is one I do not have to wait for the user to click the selection but I go to the student layout automatically.
Yes the summary field in a filtered portal is "display only".
To get the count as a number you can check in a script or other calculation, you'd need to either define a relationship that duplicates the matching done by the portal filter, but at the relationship level. OR, if using FileMaker 12, set up an Execute SQL calculation that replicates the same logic as the portal filter.
Both options are "easier said than done".