July 22, 200817 yr 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.
July 22, 200817 yr 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.
July 22, 200817 yr You need to uncheck 'Do not evaluate if all referenced fields are empty', I believe. So do I.
July 22, 200817 yr 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.
July 23, 200817 yr 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 July 23, 200817 yr by Guest
July 23, 200817 yr 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.
March 21, 200916 yr 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.
March 21, 200916 yr Are you speaking of a calculation field? And what is the trigger? And what is the purpose?
March 21, 200916 yr 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.
March 21, 200916 yr Repeating fields do not handle auto-enter well. I suggest you DO use a global calculation field instead.
March 22, 200916 yr 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