2 Replies Latest reply on Jun 22, 2011 11:17 AM by aammondd

    Dynamic table processing. (Array Variables)



      Dynamic table processing. (Array Variables)


      Im trying to establish a script that processes a work record (a table of global fields) into various tables based on information contained in key fields.

      I have a reference mapping table of layou::table::fieldnames rather than trying to build complex relationships I was trying to build a script to read in the neccessary mappings into an array and then begin processing the array.

      I figuered I could do the neccessary finds and  \use the found count to loop through reference records building my array.

      I was going to use "repetition" numbers (based on variables)  to assign values to the array.

      Is  there a function that can tell me the number of repetitions of a variable that exist? (Just curious as counter variables should tell me)

      Has anyone done this before?

      know im going to need individual layouts with all editable fields on the layout. (should calc fields go as well?)

      Im just bouncing this idea around at the moment. Any pitfalls you might see?



        • 1. Re: Dynamic table processing. (Array Variables)

          There are two ways to implement an array in variables. You've described one. The other approach is to build a return separated list of values in one repetition of a variable. With that approach, you can use getValue to extract a specific list element and ValueCount will tell you the number of elements in your array.

          If you prefer repetitions, you'll need to associate a second variable with it that stores the number of elements and then update it each time you append/remove elements from the array.

          PS. I'll be interested to see how this approach works for you--especially with tables that have very large numbers of records. I would think you'd take a significant performance hit with this approach, but could be wrong.

          • 2. Re: Dynamic table processing. (Array Variables)

            The processing is meant to work on either new records or a very limited found set. The array is simply a way to loop through the processing of multiple tables from a single set of values.

            I have used a similar scheme to replace values but I simply looped through a processing table constructed based on a value list choice in that case. I just figuered I could bypass writing out the processing table by using array variables.