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.

repeating fields and Let()

Featured Replies

While wrestling with a repeating calculation I found something interesting...

For a repeating calculation field:

Let([

rep = Get(CalculationRepetitionNumber);

item = Items::Item ID];

rep

)

will not return a value for any repetition but #1.

Let([

rep = Get(CalculationRepetitionNumber);

item = Extend(Items::Item ID)];

rep

)

will resolve correctly.

It seems that even if the Let variable is not used in the result, the calc will fail without Extend.

Your first example doesn't have a true FIELD in the calculation itself, even though you have it within the Let(). You need to uncheck 'Do not evaluate if all referenced fields are empty', I believe.

You need to uncheck 'Do not evaluate if all referenced fields are empty', I believe.

So do I.

That's only true if NONE of the values could evaluate. I'm sure his Items:itemID does evaluate to something.

His initial conclusion is correct. You have to extend any part of the calculation that is not a repeat.

I'm sure his Items:itemID does evaluate to something.

Oh but it does. The ItemID can have a value and DJ even says it does; that is not the issue here.

Try this:

Let ( i = Get ( CalculationRepetitionNumber ) + ItemID; i + i )

... where ItemID contains the value of 3. It produces 8 in ONLY the first rep. It isn't until you uncheck that box that it extends. But when it extends, watch what happens ... it produces 8, 4, 6, 8, 10.

UPDATE: I probably didn't get to my point very well ... the first rep isn't recognized as a true repetition; after all, ALL fields have one rep. It isn't until it is extended OR until you uncheck that box so empty values (of the ItemID) also show, that the reps all fill in.

Oh, Michael can explain it better.

Edited by Guest

It comes down to the same thing. From the point-of-view of the second repetition:

- If the referenced field is NOT extended, then MY reference is Field[2]. This is empty, so if 'Do not evaluate if all referenced fields are empty' is on, I do not return a result.

- If the referenced field is extended, then MY reference is Field[1], which is not empty - so I do return a result.

  • Author

Thanks guys, I understand the why now!

  • 7 months later...

Resurrecting an old thread...I need to populate a global field that has 3 reps with the contents of a text field that also has three reps. I'd like to use Evaluate. Can this been done?

gField = Evaluate ("Field" ; trigger)

only gives me the first rep in gField.

Are you speaking of a calculation field? And what is the trigger? And what is the purpose?

The final goal is to take a container with 3 reps and "publish" its values to a corresponding global container with 3 reps that has an Auto-Enter calc, replace existing entry option.

I don't use global calcs. I don't use Set Field. I want to use Evaluate. It's the method I use now to set my globals. The trigger is just a field that when I use Set Field, causes all globals to reevaluate. Works fine if there are no field repetitions.

Repeating fields do not handle auto-enter well. I suggest you DO use a global calculation field instead.

OK. Thanks for taking a look.

Repeating fields will populate with lookups but not AE calcs. Try a lookup instead. Has to be a "real" lookup not a calc lookup function.

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.