InfoMatters Home Page Search the Site

This page lists news items related to the InfoMatters, Inc.. Here is the detail record you chose. You may also Search for other items.

Lost Meta Tag Found!

a Tango Tips & Tricks written by Chris Ogden 8/12/1999   

We also posted this to the Tango Talk list...

>PS. While we're on the subject of advanced array manipulation, you might also want to play around with @MAP

@MAP has been around since May of 1998!

It's a super-secret, never been documented, and unknown to all but a handful of people Tag...

<@MAP ARRAY=array [VALUE='meta-expression']>

The way I describe it is that it's like @FILTER, but with the ability to change the values of the items returned.

One of the things I use for is to concatenate elements in an array and/or update prices. Two quick examples are listed below.

The only problem is that it ONLY RETURNS A ONE COLUMN ARRAY (ie, it does NOT return the rest of the array). It only returns one column. However, if you really need to get around that, you could create a delimited string for each row and turn it back into array via a loop and @ADDROWS.

Now if we only had @ADDCOLS and @DELCOLS!

-c

PS. In preparation for the Pervasive Partners conference, we're punching up our collection of our Tips, Tricks, & Free Stuff (or as someone said, "How to make Tango do things it wasn't supposed to be able to do"). If you'd like a copy when it's done, sign up on our mailing list.


Anyway, here's some examples of @MAP at work:

HR Info With Salaries:

(Prefix - First Last - Salary - Bonus)
<@assign local$salaries '<@ARRAY VALUE="Mr.,Bob,Smith,45000,1500;Ms.,Jennifer,McAuliffe,39000,3000;Dr.,Chris,McAuliffe,26000,5000">'>
@@local$salaries


Concatenate Names:
<@MAP local$salaries value='#1 #2 #3'>


Use @MAP's math and string manipulation...


Give everyone who makes more than $40,000 three weeks of vacation, all else get 2:
<@ASSIGN local$Vacation "<@MAP local$salaries value='<@IF "#4 + #5 > 40000" true="3 weeks (#1 #2 #3)" false="2 weeks (#1 #2 #3)">'>">
@@local$Vacation

 

Please use your browser's "back" button to return to the previous page to access other items, or you may wish to Search for other items.


If you'd like... you can be automatically notified when this page changes, rate this page by casting your vote, Join Our Mailing List, or Give Us Feedback!


Corporate Background | Our Approach | Our Products & Services | Our Team
Our Team's Client Portfolio | What's New | Your Investment | Get More Info | Jobs | Search This Site | About This Site

portions of this website copyright 1997, InfoMatters,Inc.