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.
Juggernaut

How to count "active" repetitions

Featured Replies

I have a text field with 10 repetitions.

In some records all of the repetitions are populated with a value.

In some of the records only a few of them are populated.

[color:red]Is there a way to keep count how many of the repetitions are populated?

Thanks for any suggestions,

Jarvis

Hopefully do you not ignore the omnipresence of warnings against the utilization of repeaters as such??

http://www.briandunning.com/cf/287

--sd

Hi,

The use of repeating fields for data storage is not recommended. This course of action will eventually lead to problems.

However I do believe a calculation will do the thing you require. Make the calculation unstored so it will calculate each time the record is accessed.

occupiedreps = Sum(

(not IsEmpty(GetRepetition(yourfield;1)+

(not IsEmpty(GetRepetition(yourfield;2)+

(not IsEmpty(GetRepetition(yourfield;3)+

(not IsEmpty(GetRepetition(yourfield;4)+

(not IsEmpty(GetRepetition(yourfield;5)+

(not IsEmpty(GetRepetition(yourfield;6)+

(not IsEmpty(GetRepetition(yourfield;7)+

(not IsEmpty(GetRepetition(yourfield;8)+

(not IsEmpty(GetRepetition(yourfield;9)+

(not IsEmpty(GetRepetition(yourfield;10))

Should total all non empty repeats.

HTH

Tim

Why ? the Count ( ) function doesn't work ?

Something like:

Count( YourRepeatingField )

Nah, too simple... :chili:

So easy it just might work! :gang::exactly: :tigger:

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.