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

if i have have a field with different number values in it

ie 1, 2, 3, etc

how do i get to count all the number 1,s

not so easy for a newbie

thank you

Try using the function "PatternCount"

For example, if you have a field called "NumField" with your numbers, define another field "NumberOnes" as a calculation with PatternCount (NumField, "1"), then a summary field "SumNumberOnes" to count "NumberOnes" defined as "Total of NumberOnes."

Hi ash00182,

If there are several numbers in the text field such as [color:green]2, 2, 3, 11, 32, 3 2, 3 then I suggest you break them into a proper relational structure if you can. If you can't, then you need to protect from PatternCount() because the formula given will produce false positives, ie, it would count 11 as two 1's instead of 11. I will refer to your number field as theField. Here is one way you can use a calculation (result is number) =

PatternCount ( ¶ & Substitute ( theField ; [ "," ; " " ] ; [ " " ; ¶ ] ) & ¶ ; "¶[color:green]1¶" )

But I suspect this isn't what is needed at all but rather each field contains one number and the need is to count how many records in theField contain 1; how many contain 2 and so on. You can use a report to count them all without creating a calculation for each number. Here is how:

Create a new field called sTotalCount, type SUMMARY and specify Count of theField. Then create a new columnar list layout, Report with Grouped Data. Specify fields and select theField and cTotalCount (and any other fields you wish to display in the body). Organize by theField. Sort by theField. Theme & Header/Footer however you wish. Then let FM create the script for you. It is critical that this report be sorted by theField and FM will store the sort in the script, as well as Go To Layout [ thisNewLayout ] and even enter Preview Mode for you. But when it asks, don't go to Preview Mode at fist ... go to Layout mode. The bottom part is your body (which will contain the detail records). If you don't want a body, but only want the totals as:

Value 1 = 244 (count of how many records have 1 in theField

Value 2 = 122 (etc)

... then take that sTotalCount field and move it up into the same part as theField. Then delete the body part by clicking the part panel to the body ONCE (left tab with 3 dots) then hit DELETE. Switch to Browse and save your layout. Run this new script FM created for you. If you would like a sample file of a report, we can easily provide one - just let us know ...

LaRetta :wink2:

  • Author

thanks for reading my post and even more for replying i will try these solutions out

and LaRetta if you could send me a sample file i would be grateful

I'd be happy to ... please clarify whether all the numbers are in one field (as 2, 11, 4 etc) or whether the field only contains one number. :wink2:

  • Author

the field only contains one number

ie if i do a find and it comes up with 10 results

the number field will have 10 separate values

ie 1, 2, 5, 1, 3, 6, 11, 8, 9, 1,

i need to count all the number ones

and not the eleven

so the result should say 3

thank you bye

  • Author

hi breeezer

i tried this and it works if i only have one find result

but if i have 10 finds it lists them all seperatley

i need the total of number ones in the 10 find results any more ideas

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.