K1200 Posted March 19, 2007 Posted March 19, 2007 I have a table where each record contains an editable value (along with associated information). At runtime, I need access to the values as a one-dimensional array, so I transfer them at startup into a global repeating field. All this works fine, but I got to thinking: Is there a way to define an unstored calculated repeating field that effectively resolves its contents in realtime, whenever another calculation references the field? I put together a test file using text fields in place of numbers (easier to see what's happening). I've tried a couple of different approaches but all I've been able to get is a value in the array's first position. What I need is for the second record's value to be in the second position and the third record's in the third position and so on. I don't necessarily expect the array to be fully populated all the time (e.g., for display), but when referenced from another calculation (Alpha::Result in the example file), it needs to return the proper record's value. Is it even possible to do this, or should I leave well enough alone and stay with my original approach? (BTW, there are 200 records in the table, so I really don't want to use a 200-element case statement, which seems very inefficient if it's even possible.) Thanks in advance for any suggestions. Array.fp7.ZIP
K1200 Posted March 19, 2007 Author Posted March 19, 2007 Excellent! I tried it in my application and it works like a charm. I had not had a reason to use the Extend function before and (based on the book definition) I'm afraid I would not have thought to try it for this. This is an elegant solution that provides a displayable array as well. Thank you very much.
Recommended Posts
This topic is 6520 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