Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

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.

Posted

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.

Posted

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.

Posted (edited)

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
Posted

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.

  • 7 months later...
Posted

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.

Posted

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.

Posted

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.

This topic is 5784 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.