Thank you for your post!
I'm going to move this thread from the FileMaker Community Feedback Space (which is specifically for input on the Community itself) to the Discussions Space where you should receive more views and potentially more feedback on this topic!
It appears that you are confusing rows and columns. If "Mike Mary Mike" were data in three rows in the same column, your counts become pretty straightforward.
thank you for your answer. It is the same column...
I hope you have the solution!
PatternCount function will do this for you.
I've tried PatternCount but it counts letters or groups of letters only inside a cell. I need it to count the same word inside the same column.
The idea is
That's easiest done with ExecuteSQL(), i.e:
ExecuteSQL ( "
SELECT COUNT(YourColumn), YourColumn
GROUP BY YourColumn
" ; " " ; "" )
Is your match.
Sent from miPhone
I'll try that.
Pardon my inexperience, where do I write the ExecuteSQL in FileMakerPro?
You do this in a calculation field or assign a field- or variable-value in a script, depends where you want to show the result...
Quite so. If you use a simple calc it will only look at a single record. To use it to look at the contents of, say, a single field in all records, you have to set up the calc to view data through an appropriate relationship. A self-join cartesian relationship will achieve this—
PatternCount ( textField ; "Mike" ) will only return the number of times Mike appears in textField in the current record.
PatternCount ( ALLrecords::textField ; "Mike" ) will return the number of times Mike appears in textField in any record in the table.
I would not use a calculation field, but rather the scripted Set Field (or Set Variable for further processing).
You're right, except the calculation-field is unstored in a GUI-/session-/dashboard-table...
1 of 1 people found this helpful
If your calculation is in the same table (Materiel) that would then be this:
ExecuteSQL ( "
WHERE \"Model\" = ?
" ; "" ; "" ; Materiel::Model )
Make the calculation unstored
this can still be a scripted Set Field for many records.
and sometimes the Variables are used in a GUI-/session-/dashboard-