October 16, 20196 yr Ok, I hope this is simple.... I have a headache over this and can't figure it out! I have imported data from an excel spread sheet. ONe of the columns is if the person is a male or female. I simply want to put in the header a count of the number of females and males. I have tried many different things for the past 3 hours. The field name is "Gender". I tried this with value count, and just "count", and can't see to pull out the word "Male" out of the 40,000 fields. ValueCount ( FilterValues ( List ( Database::Gender ); "Male" ) ) PatternCount ( "Male" ; Database::Gender ) I tried setting it up in the field as a Calculation, number and text. I have no luck. Please help my rookie ignorant self get this simple field!
October 16, 20196 yr 1 hour ago, 1FilemakerMan said: ValueCount ( FilterValues ( List ( Database::Gender ); "Male" ) ) The List() function can summarize records in a related table - not records in the found set. For this, you need to define a summary field as List of Gender. Then your formula will work - though with 40k records it may not be instant. Perhaps it would be better to script this and only refresh it on demand. Of course, this is assuming you want to summarize the found set (you didn't say so explicitly). Edited October 16, 20196 yr by comment
October 17, 20196 yr Author I am not worried about how long it takes. Can you help some more on how to develop a "summary field"? I created a new field and and I am trying to count the number of times "Female" appears in it. This is driving me nuts!!!!!
October 17, 20196 yr Author ValueCount ( FilterValues (List (RN_Answers_z::Gender); "Male" ) ) ^Name of Table, ^ Name of field in the table I thought this would work, but it only shows "1". I made my FieldTable for the answer global, not sure if that is needed or not. What am I missing????? Also, in the Fields area, what type of Field should this be? Number, Summary, or something else?
October 17, 20196 yr 1 hour ago, 1FilemakerMan said: Can you help some more on how to develop a "summary field"? Like this? Once you have that, a calculation of: ValueCount ( FilterValues ( Database::sListGender ; "Male" ) ) will return the count of males in the current found set. In the old days, you could subtract this from Get ( FoundCount ) to get the count of females; nowadays I am not so sure ...
October 17, 20196 yr Author Thanks a MILLION! That did it! I have never seen the "List of" used before! Awesome!!!! Now I need to take out the duplicates, and I will be done!
October 17, 20196 yr 10 minutes ago, 1FilemakerMan said: I have never seen the "List of" used before! Welcome to version 13.😎
November 4, 20196 yr Author OK, I found a way to display/count the number of males and females without any duplicate records! Now how can I take that number and store it as a $$Global_field, so that I can display the results in a report. Ok, to get the number I simply created a Script that does the "Perform Find" function. Inside the perform find function I can filter out what I need to, to get the amount of males and females. Question is, can I take that total and put it into a Global field and display it? Right now I have a button to push in the report to activate the script and it then displays it, but I would like to display both totals, for male and females, on the same page at once. Thanks again gentlemen 🙂
November 4, 20196 yr 6 minutes ago, 1FilemakerMan said: Question is, can I take that total and put it into a Global field and display it? Sure, you can simply set the global field to Get (FoundCount). Is this a good method? I don't believe it is.
November 6, 20196 yr Author WHere do I put the Get (FoundCount) at ? I am searching on the internet and not finding any good examples.
November 6, 20196 yr 1 hour ago, 1FilemakerMan said: I am searching on the internet Try reading the Filemaker help instead. Like this page: https://fmhelp.filemaker.com/help/18/fmp/en/index.html#page/FMP_Help%2Fset-field.html%23
Create an account or sign in to comment