Re: Sorting Multiple Fields
What a twit I am! I didn't even think of using 1 field with tabstops or that you could sort by word or items in a field. You guys are great!! Thanks to all that responded., I now have a lot of good ideas to consider. Cheers, Roger On May 1, 2005, at 12:50 AM, [EMAIL PROTECTED] wrote: Message: 4 Date: Sat, 30 Apr 2005 16:10:02 -0700 From: Stephen Barncard [EMAIL PROTECTED] Subject: Re: Sorting Multiple Fields To: How to use Revolution use-revolution@lists.runrev.com Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=us-ascii ; format=flowed Is there a certain reason you have to use synchronized fields at all? Won't tabbed fields work better for you, or are you doing a lot of stuff with column math? sqb ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Sorting Multiple Fields
I have 6 list fields side-by-side each with the same number of lines, with synchronized scrolling and synchronized hilitedLines. Is there an easy way to sort the first field and have the data in the other fields follow the sort. That is to sort the whole group on the first field? Thanks, Roger ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Sorting Multiple Fields
Is there a certain reason you have to use synchronized fields at all? Won't tabbed fields work better for you, or are you doing a lot of stuff with column math? sqb At 4:02 PM -0700 4/30/05, Roger Guay wrote: I have 6 list fields side-by-side each with the same number of lines, with synchronized scrolling and synchronized hilitedLines. Is there an easy way to sort the first field and have the data in the other fields follow the sort. That is to sort the whole group on the first field? Thanks, Roger ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Sorting Multiple Fields
Roger Guay wrote: I have 6 list fields side-by-side each with the same number of lines, with synchronized scrolling and synchronized hilitedLines. Is there an easy way to sort the first field and have the data in the other fields follow the sort. That is to sort the whole group on the first field? Seems like there should be an easy way, doesn't it :-) but I couldn't think of one when I did something similar recently - here's what I came up with is (with 3 fields to save me typing) set the itemDel to TAB put 0 into ct put empty into temp repeat for each line L in field F1 put L TAB line ct of field F2 TAB line ct of field F3 cr after temp add 1 to ct end repeat sort temp put empty into field F1 put empty into field F2 put empty into field F3 repeat for each line L in temp put item 1 of L cr after field F1 put item 2 of L cr after field F2 put item 3 of L cr after field F3 end repeat Note - it would be faster to copy the whole of each field into a variable before doing something like the above - then copying the whole variable back at the end; only worth it if these are very large fields. -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.10.4 - Release Date: 27/04/2005 ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Sorting Multiple Fields
On 1 May 2005, at 00:02, Roger Guay wrote: I have 6 list fields side-by-side each with the same number of lines, with synchronized scrolling and synchronized hilitedLines. Is there an easy way to sort the first field and have the data in the other fields follow the sort. That is to sort the whole group on the first field? One way is to keep a master copy of the data with tab-separated columns. You can store this in a custom property. When you need to sort, sort the master copy and then run a routine to re-display the data in the separate fields. This is what I usually do for tables made of synchronized scrolling fields. Cheers Dave ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Sorting Multiple Fields
On 4/30/05 6:02 PM, Roger Guay [EMAIL PROTECTED] wrote: I have 6 list fields side-by-side each with the same number of lines, with synchronized scrolling and synchronized hilitedLines. Is there an easy way to sort the first field and have the data in the other fields follow the sort. That is to sort the whole group on the first field? Easiest way is to use a single field with tabstops set for the different columns. That way, it's all in one field and can be sorted like this: put fld Data into tData set the itemDel to tab sort lines of tData by item 1 of each put tData into fld Data Or, if you don't have a lot of data, you can do it directly with the field: sort lines of fld Data by item 1 of each HTH, Ken Ray Sons of Thunder Software Web site: http://www.sonsothunder.com/ Email: [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Sorting Multiple Fields
On 4/30/05 6:02 PM, Roger Guay wrote: I have 6 list fields side-by-side each with the same number of lines, with synchronized scrolling and synchronized hilitedLines. Is there an easy way to sort the first field and have the data in the other fields follow the sort. That is to sort the whole group on the first field? If you want to twist your brain in knots, you can sort using a function: local lKeyData, lLineCounter on sortBy keyField -- parallel sorting of linked flds put fld keyField into lKeyData put data1,data2,data3 into dataFields -- fill in your fld names here repeat with i = 1 to the number of items of dataFields put 0 into lLineCounter -- must be reset prior to each sort sort lines of fld (item i of dataFields) by key() end repeat end sortBy function key add 1 to lLineCounter return line lLineCounter of lKeyData end key Based on an old HyperCard script by Brett Sher. -- Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution