Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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

Try this:

PatternCount ( ¶ & $List & ¶ ;¶ & $CurScore & ¶ )

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?

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

eg= Show me the Value Count ( how many ) Times "Bryan" is in the list.


ValueCount (  FilterValues ( List ( BaseTable::FirstName); "Bryan")

The Question to you Comment would be Why would you?

Why would I what?

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

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.

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

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.