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

Defining calculated repeating field

Featured Replies

I don't understand how to define a calculated repeating field. Just to test, I have a calculated (text) field with two repetitions. Right now I'm trying to put text into the repetitions with this calculation:

Case(Get(CalculationRepetitionNumber);"V1";"V2")

I was thinking that V1 and V2 would show up in the repetitions, but only V1 does. So I'm not understanding something simple. :)

What am I doing wrong? Eventually I'll use Let to define V1 and V2 by calculation.

You are testing if Get (CalculationRepetitionNumber) is true or false. The first repetition number is 1, the second is 2. Therefore your test is always true.

  • Author

Yes, of course you are right! I left out the condition. :)

So if I use this: Case(Get(CalculationRepetitionNumber)=1;"V1";"V2")

or this:

Choose(Get(CalculationRepetitionNumber)-1;"V1";"V2")

I only get the value into the first repetition.

What am I misunderstanding, and how do I need to structure the calculation to put results into both repetitions.

Thanks!

Both formulae above should work - so there must be something else that you're not telling us.

The real question is why you are using a repeating field. For the most part they just create a lot of problems and a real relational structure should be used.

  • Author

Yes, they do now. I'm not sure what was wrong before. Thanks for the help.

  • Author

I'm trying to learn how they work for calculation purposes, not for data storage. I'd like to explore, for example, the potential for using a repeating field for the columns in a crosstab type report that I need to create. But with a well normalized data structure (which I don't have yet), there may be better ways.

I'd welcome comments on when and where repeating my best be employed.

... why you are using a repeating field. For the most part they just create a lot of problems and a real relational structure should be used.

James, statements such as the above have stopped many from using repeating fields AT ALL. And true, when used for data they can be problematic and we feel an obligation to make that clear (as Bruce did).

But I find it sad that these very statements also dissuade many from learning them for developement use (such as calculations). There is a great distinction between the two uses. Repeating fields are a tool which offer incredible power and flexibility to a Developer. And, as a tool, they are neither good or bad; it's how (and when) they are used that matters. You GO for it. You will be a better Developer if they are in your toolkit. :wink2:

They are INCREDIBLE for cross-tab and column report functionality also!!

LaRetta

  • Author

Thanks for the encouragement, LaRetta! If I could find some examples of how repeating fields can be creatively and properly deployed, I'd like to study them. That way I might ask fewer questions. :

I appreciate the help.

I have only recently (within last year) removed the Repeating Field blinders myself. I suggest you do a search for them here on Forums; particularly posts by Comment, Ugo or JT. There are some great demos out there. Most calendaring solutions use them as well. :wink2:

Here is one such example of repeating field power: Date Style Multiline . My need was cross-tab functionality of date periods that could change dynamically. It's a terribly powerful concept.

Here's an example of a repeating calc for displaying a progress bar:

http://fmforums.com/forum/showtopic.php?tid/137110

Perhaps this might give you some ideas:

http://fmforums.com/forum/showtopic.php?tid/137788/

And how could we possibly forget this one by Comment !! :jester:

  • Author

YIKES! I must admit that this is well beyond my ability to understand--for now. :

But I believe that I can sort it out with a little study. And it does sound quite powerful and flexible.

I don't recall seeing a sample file but would surely like to. Was there one there that I missed?

Thanks for pointing me to this!

  • Author

Yes, it does give me some ideas, as does the link posted by Ender. I'm grateful for all the help and suggestions!

  • Author

They are INCREDIBLE for cross-tab and column report functionality also!!

Moved reply that was here to a new topic here as I was getting off track. :

Edited by Guest
Start new topic

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.