Inconsistent results in simple script

Mike Bonner bonnmike at gmail.com
Wed Nov 16 21:58:17 CET 2016


Craig is right, this is asking to be an array, though if you prefer a flat
file you can combine it at the end like so.

on mouseUp
repeat for each line tLine in field "csv1"
   put item 2 of tLine into tDataA[item 1 of tLine]
end repeat

repeat for each line tLIne in field "csv2"
   put comma & item 2 of tLine after tDataA[item 1 of tLine]
end repeat
combine tDataA with return and comma

/*
Places the following into tDataA
11234,maryjane,SDKTHYUPTO9
12234,stevesmith,SDTKLL54RR2
12345,johndoe,SDTKNY12345
*/
end mouseUp

On Wed, Nov 16, 2016 at 1:43 PM, JOHN PATTEN <johnpatten at me.com> wrote:

> Hi Craig,
>
> I have about 1000 students that are in a library system showing them as
> having checked out an iPad. In the library system it uses the student
> username and the barcode as the item identifier.
>
> I have another list that shows our iPads by barcode and serial number.
>
> Unfortunately there is no way for me to pull a report that shows the
> student username and the device serial number in one report. So I was
> essentially searching for the barcode in both lists and then combining the
> username from one and the serial number from the other. Ultimately ending
> up with a list that consists of student username and device serial number.
>
> I hope that is a little clearer.
>
> Thank you!
>
> John Patten
> SUSD
>
>
> > On Nov 16, 2016, at 12:22 PM, dunbarx <dunbarx at aol.com> wrote:
> >
> > HI.
> >
> > So, a single list. What is the relationship between the fact that a
> > particular barcode refers both to a student and a serial number? In other
> > words, if you had a single list, how would "12345" relate to both "john
> doe"
> > and "SDTKNY12345"?
> > Would you simply have two lines:
> >
> > 12345,johndoe
> > 12345,SDTKNY12345
> >
> > Also, I do not understand what you mean when you said:
> >
> > "I have cut my username list down to about 30."
> >
> > Does that mean that in your 1000 line first list, the usernames appear
> with
> > multiple barcodes? Or are those lines empty? Or is that list now only 30
> > lines long?
> >
> > It looks like this begs for an array, but I am missing what you expect as
> > output. Whatever it is, the procedure will be simple. But I cannot even
> > start to advise about that procedure until I know what the answer is.
> >
> > Craig
> >
> >
> >
> > --
> > View this message in context: http://runtime-revolution.
> 278305.n4.nabble.com/Inconsistent-results-in-simple-script-
> tp4710376p4710377.html
> > Sent from the Revolution - User mailing list archive at Nabble.com.
> >
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


More information about the use-livecode mailing list