David Jondreau Posted July 22, 2008 Posted July 22, 2008 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.
LaRetta Posted July 22, 2008 Posted July 22, 2008 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.
comment Posted July 22, 2008 Posted July 22, 2008 You need to uncheck 'Do not evaluate if all referenced fields are empty', I believe. So do I.
Rob P Posted July 22, 2008 Posted July 22, 2008 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.
LaRetta Posted July 23, 2008 Posted July 23, 2008 (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 July 23, 2008 by Guest
comment Posted July 23, 2008 Posted July 23, 2008 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.
David Jondreau Posted July 23, 2008 Author Posted July 23, 2008 Thanks guys, I understand the why now!
bcooney Posted March 21, 2009 Posted March 21, 2009 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.
comment Posted March 21, 2009 Posted March 21, 2009 Are you speaking of a calculation field? And what is the trigger? And what is the purpose?
bcooney Posted March 21, 2009 Posted March 21, 2009 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.
comment Posted March 21, 2009 Posted March 21, 2009 Repeating fields do not handle auto-enter well. I suggest you DO use a global calculation field instead.
bruceR Posted March 22, 2009 Posted March 22, 2009 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now