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.

Clculation with repeating fields

Featured Replies

If I create a calculation field, and in the Field options set the repeating value to 6, and when I place the Field in my layout I set the Field Format Repeat to 6:

In the calculation for this field I enter "1"

In my layout the first of the 6 repetitions contains the 1, the other 5 are empty. If I use this calculation----

"1" & "2" & "3"

Then the first repetition reads 123, the other 5 are empty.

Can I modify the calculation so that the "1" shows up in the first repetition, the "2" shows up in the second repetition, and so forth. I know there is other simple ways to do this, but I need the field to be a single field with repitions with different data in each field.

You can't. Repeating fields are a holdover from the FM 2.0 days and it's best not to use them. There is always another way to do what you want.

-bd

There are cases when a repeating field is of value for storing variables, graphics, or other array similar information. Otherwise, LiveOak is right. If you simply need to store the values 1,2,3,4,5, & 6 in separate fields, then create a repeating global field and enter the values by hand.

If, on the other hand, the content of each repetition is not fixed, but should be calculated based on another non-repeating field, then you need to use the Extend command. However, I can only state yet again, stay away from this approach unless you have no other way to do this. Maybe if you were to let us know exactly what you are trying to achieve, we could help you more. In other words, why do you need this?

Rigsby

Start with a global field, gDays, with 31 repetitions, and fill those repeats with the numbers 1 through 31.

Next you need a date field, I'll call it myDate.

Now you need a field that calculates the number of the last day of the month , I'll call it EndOfMonth:

Day(Date(Month(myDate) + 1, 0, Year(myDate)))

The grande finale is a calculated repeating field, DaysCalc:

Case(gDays less.gif Extend(EndOfMonth), gDays)

My gut says there is a way to do it without the global field, but my brain is not cooperating.

  • Author

OK, here is what I really need it for:

I need a field that will be set-up to repeat 31 times (horizontally).

In the first field a calculation that looks at a field called TadaysDate and looks at the month. Depending on the month, it will determine how many days are in that month, and fill in each of the 31 fields accordingly with a number for each day:

1 2 3 4 5 6 7

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.