Using Arrays to compare 2 tables
Posted: Thu Apr 09, 2015 4:44 pm
I have some data in table one that i need to matchup with table 2. By email address. (see attachment)
I then need to put the matching line in table 1 in table 3 and will export table 3 to a text file.
I have never used arrays before and think it would be the fastest to do this.
this is what I have so far and it seems to put them in the arrays but I have tried everything else i could find to match them and its not working.
local tFirstArray, tsecondArray
on mouseUp
set the itemdel to tab
put "" into field "text3"
put line 1 of fld"text1" & cr into fld"text3"
put fld"lc1" into tLineCt1
put fld"lc2" into tLineCt2
repeat for each line tLine in fld"text1"
put it into tFirstArray[tLine]
end repeat
combine tFirstArray by return and tab
put the number of lines of tFirstArray into fld"lc1"
repeat for each line tLine2 in fld"text2"
put it into tsecondArray[tLine2]
end repeat
combine tsecondArray by return and tab
now what???
Thank you for any help you can give.
I then need to put the matching line in table 1 in table 3 and will export table 3 to a text file.
I have never used arrays before and think it would be the fastest to do this.
this is what I have so far and it seems to put them in the arrays but I have tried everything else i could find to match them and its not working.
local tFirstArray, tsecondArray
on mouseUp
set the itemdel to tab
put "" into field "text3"
put line 1 of fld"text1" & cr into fld"text3"
put fld"lc1" into tLineCt1
put fld"lc2" into tLineCt2
repeat for each line tLine in fld"text1"
put it into tFirstArray[tLine]
end repeat
combine tFirstArray by return and tab
put the number of lines of tFirstArray into fld"lc1"
repeat for each line tLine2 in fld"text2"
put it into tsecondArray[tLine2]
end repeat
combine tsecondArray by return and tab
now what???
Thank you for any help you can give.