The eccoMAGIC Forums
http://forums.eccoMAGIC.com/forum/YaBB.pl
the SLANG EXTENSION and Guest Programming >> Slang Rules Scripts, Functions, Examples and HOW TO >> Sample of using TABLE in Parent
http://forums.eccoMAGIC.com/forum/YaBB.pl?num=1205175227

Message started by Admin on 03/10/08 at 13:53:46

Title: Sample of using TABLE in Parent
Post by Admin on 03/10/08 at 13:53:46


::) Have sub items' folders filled in,  based on a TABLE of the item's parents!


for this example,


you have several store locations,
at each location you have staff.

You want to print out a shift schedule,  but you don't want to have to type in each persons name over and over, etc.

You could use a Pulldown list  ==> if you have less than 256 options.

but sometimes it's just easier and much faster,  to enter first & last initial, etc.


or many other instances where being able to LOOKUP A TABLE  is extremely helpful!

(results could also be used in calculations, etc. etc.)


here,  you could have a different list of names (different table) for each location..

also,

you can have multiple tables....


key rule is:



Quote:
++:!+NFP:imatch([^Table], "(?:^|\n)\Q" + [Index] + "==>\E(.*)(?:\r|\s*$)"):




Title: Re: Sample of using TABLE in Parent
Post by Admin on 03/10/08 at 14:02:12


here is an alternative structure,

using a very simple rule:



Quote:
++:!:eval("[^Shift" + [Shift#] + "]"):



which also demonstrates the power of the "Eval()" expression... to build rules 'on the fly'....



here you have an actual table (ecco style) to fill in -- each folder # gets a distict value, and you reference each item by that folder # (could also be name/digits, etc.)




The eccoMAGIC Forums » Powered by YaBB 2.1!
YaBB © 2000-2005. All Rights Reserved.