Hi Ted, This works perfectly for what I need. I appreciate your help. I have always been a little lacking in arrays.
;-) -----Original Message----- From: WebDude [mailto:[email protected]] Sent: Friday, September 28, 2012 1:50 PM To: [email protected] Subject: RE: TeraScript-Talk: Array Help Thanks... I am going to look at this on Monday. -----Original Message----- From: [email protected] [mailto:[email protected]] Sent: Friday, September 28, 2012 12:10 PM To: [email protected] Cc: WebDude Subject: Re: TeraScript-Talk: Array Help Hi, this code should do the trick, i didn't test it. <@ROWS START=1 STEP=1 ARRAY="@@request$array1"> <@ASSIGN NAME="temparray" VALUE='<@FILTER ARRAY="<array 2>" EXPR="#2=@@request$array1[<@currow>,4]" SCOPE="request">' SCOPE="request"> <@ASSIGN NAME="@@request$array1[<@currow>,3]" VALUE="@@request$temparray[1,3]" SCOPE="request"> </@ROWS> Ted ---- WebDude <[email protected]> wrote: > Hi Folks, > > Probably stupid and easy to do, but I am having trouble wrapping my > brain around this one. I have two arrays with different number of rows > and different values. I am trying to update the larger array with > values that match the smaller array. For example... > > Array 1 (larger array) > > 1 2 value1 1 > 1 2 value2 1 > 1 2 value3 2 > 1 2 value4 2 > 1 2 value5 3 > > Array 2 (smaller array) > > 1 1 value1 > 2 2 value2 > 3 3 value3 > 4 4 value4 > > What I am trying to do is if col 4 of array1 matches col 2 of array 2, > insert value of col 3 of array 2 into col 3 of array 1. > > Any help would be appreciated. > > Thanks! > > > > > > > > > ---------------------------------------- > > To unsubscribe from this list, please send an email to [email protected] with "unsubscribe terascript-talk" in the body. ---------------------------------------- To unsubscribe from this list, please send an email to [email protected] with "unsubscribe terascript-talk" in the body. ---------------------------------------- To unsubscribe from this list, please send an email to [email protected] with "unsubscribe terascript-talk" in the body. ---------------------------------------- To unsubscribe from this list, please send an email to [email protected] with "unsubscribe terascript-talk" in the body.
