March 19, 201213 yr In a script I have Set Variable for a list of scores. Example: 8 14 18 16 21 20 24 27 I am writing a loop to count the times a value occurs in the list. Then go to the next value. I tried PatternCount, but it counted 20 when I was looking for count of Value=0. $CurScore is the individual Value. PatternCount ( $List ;$CurScore & "¶") thanks, Jim
March 19, 201213 yr Or = ValueCount ( FilterValues ( listOfValues ; item ) ) I am writing a loop to count the times a value occurs in the list. Then go to the next value. Why won't you use a table to hold your values, then summarize the records using a summary field?
March 19, 201213 yr Or = ValueCount ( FilterValues ( listOfValues ; item ) ) Why won't you use a table to hold your values, then summarize the records using a summary field? The Question to you Comment would be Why would you? _ At least that is my question. I know your fav function is filtervalues( ) _ it is becoming mine as well. -i
March 19, 201213 yr eg= Show me the Value Count ( how many ) Times "Bryan" is in the list. ValueCount ( FilterValues ( List ( BaseTable::FirstName); "Bryan")
March 19, 201213 yr Why would I what? Answer the question: Why won't you use a table to hold your values, then summarize the records using a summary field? _ I am asking you wy would you use a table to hold your values and then summarize the records using a summary field? -thanks
March 20, 201213 yr Because that's how a database application is designed to handle data: structured into records and fields. Otherwise why wouldn't you put ALL your data into a single global field, and deal with it through looping scripts and what have you? Here the question is how many times does each value appear in the list - and Filemaker already has the mechanism to handle this by sorting the records by value and showing the count in a summary field placed in a sub-summary part.
March 20, 201213 yr Thank you. Now Perhaps Jim Shelton can use this information to further understand this feature / use just as i do now.. I think thinking logicaly such as a structured database is hard to comprehend for some of us because we are thinking quick fix or code something rather than just use simplicity techniques as you recommend all too often. UNDERSTANDING Data structure is the absolute most important think i am learning by using FIlemaker, Albeit annoying at times. : )
Create an account or sign in to comment