Le samedi, 28 juin 2003, � 07:57 Europe/Brussels, Ludovic Th�bault a �crit :
I've a long list field with double entry
I want to eliminate double.
I use this script :
repeat for each line l in myLongList if l is not in myLongListWithoutDouble then put l&cr after myLongListWithoutDouble end if end repeat
But it's long. There is an another solution ? Thanks.
Hello Ludovic
here is a script I use to do the job between two flds Very fast !!!
On mouseUp put "" into fld "resultat" put fld "listeUn" into tmpUn put fld "listeDeux" into tmpDeux put commonLines(tmpUn,tmpDeux) into fld "resultat" end mouseUp
function commonLines pList1, pList2
repeat for each line tLine in pList1
put 1 into tArray[tLine]
end repeat
repeat for each line tLine in pList2
if tArray[tLine] = 1 then
put 2 into tArray[tLine]
put tLine & cr after tRetVal
end if
end repeat
delete char -1 of tRetVal
return tRetVal
end commonLinesYou can easily do t he same on ONE list with something as :
put myLongList into tmpUn put myLongList into tmpDeux put commonLines(tmpUn,tmpDeux) into myLongList
Avec un petit bonjour de la Belgique vers la France !! et heureux de te d�panner !
Greetings Yves COPPE [EMAIL PROTECTED] _______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
