Playmaker Forum

PlayMaker News => General Discussion => Topic started by: nuxvomo on March 29, 2020, 04:24:40 PM

Title: ArrayMaker - Add two Array List indexes to create a 3rd Totaled Array List[SOLVE
Post by: nuxvomo on March 29, 2020, 04:24:40 PM
I'm using ArrayMaker and I want to add the indexes of one Array List Proxy to the corresponding indexes of another Array List Proxy and show each corresponding index Total in a 3rd Array List Proxy.

Is there an easy or better way to do this that I'm just not seeing?

Thanks!
Jim
Title: Re: ArrayMaker - Add two Array List indexes to create a a 3rd Totaled Array List
Post by: jeanfabre on March 30, 2020, 02:26:57 AM
Hi,

 use ArrayListConcat to achieve this.

Bye,

 Jean
Title: Re: ArrayMaker - Add two Array List indexes to create a a 3rd Totaled Array List
Post by: nuxvomo on March 30, 2020, 07:48:19 AM
ArrayListConcact just adds the indexes of array 1 to the end of array 2. I need to sum the corresponding indexes of array 1 and 2 to a 3rd array.
I.E. (array 1, index 0) + (array 2, index 0) sum to (array 3, index 0) an do this for all corresponding indexes.
I hope that's more clear.
Title: Re: ArrayMaker - Add two Array List indexes to create a a 3rd Totaled Array List
Post by: sebaslive on April 01, 2020, 11:48:35 AM
Hey, You can do an array get next to get the first index, move to a new state and array get next on the second array, add those two temporary numbers from both arrays and add to a new array then loop back to the first state.
Title: Re: ArrayMaker - Add two Array List indexes to create a a 3rd Totaled Array List
Post by: nuxvomo on April 01, 2020, 12:24:08 PM
@sebaslive
OK, thanks!
That's what I have in place currently.
Just wanted to make sure there wasn't some action to make this cleaner.
I'm building a new version of an app and just trying to clean up wherever I can.
Thank you for your help and for ArrayMaker!