Jump to content
Server Maintenance This Week. ×

How to count "active" repetitions


This topic is 6378 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This topic is 6378 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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