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.

found count of unique value

Featured Replies

I'm attempting to create a "results" panel on one of my forms which is displayed after a find is performed. Getting the foundcount was easy, but I want to also display the foundcount of unique values in the found set. I have a damaged field - the field either contains a "Damaged" or "NotDamaged" value. I want to return the results of each. I have created two fields - _found_count_damaged and _found_count_notdamaged. I'm struggling to find the correct formula to display these results accurately from the found set:

 

Count( _damaged) = "damaged" always returns a result of 0. Can someone please point me in the right direction?

 

 

I'm also attempting to display the omitted results for each found count. It is accurately telling me what records have been omitted from the entire table, but not just the found count. The value should initially be "0" unless the user actually omits a record from the found count. Is this possible? This option isn't necessary, though I thought it would be interesting to include it. The formula I have so far is:

 

Get (TotalRecordCount) - Get (FoundCount)

A couple ways I can think off right off the bat:

- use the new ExecuteSQL to do a two counts

or

- do the search for the "damaged" first, store the found count in a variable, then extend the found set with the "not damaged", the difference in found count will the the count of the not damaged

or

- after building the found set, fire a looping script to inspect all the records and keep two counters.  You can use the GetNthRecord function to avoid actually having to visit each record.  Depending on the number of records in the found set this can be very fast

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.