Hi,
I am trying to use 2 appendToRecordLists, one after the other, in the same loop, in order to capture 2 sets of values. However, the problem I am running into is that since the records are not actually appended as entries to the “toList” and there is a reference to the “fromList”, everytime the value changes, and the data gets crossed between the lists. How can I keep the 2 separate and yet get the individual recordlists for the 2 parameters? Your expertise in this area is solicited.
VR is right on with using temp variables, and dropping toList/fromList/fromItem after the call to appendToRecordList.
Keep in mind that lists hold references to objects. That means if you append a record to two lists then you have two lists that reference the same object. Changes to the object will be reflected in all references.
If you want independent records within the two lists, then you need to clone the record and add the clone’s reference to one of the lists.
Create empty, temporary Record List variables before entering the loop using “Set Value…” and providing no inputs. [*]Do not specify an out-array in the LOOP step
Inside the LOOP step, you should follow Rob’s suggestions above.