The eccoMAGIC Forums
http://forums.eccoMAGIC.com/forum/YaBB.pl
the SLANG EXTENSION and Guest Programming >> Slangmgh: Questions, Suggestions, Requests >> Set Column Value based on Other Column Value
http://forums.eccoMAGIC.com/forum/YaBB.pl?num=1275930520

Message started by ScottSutherland on 06/07/10 at 12:08:40

Title: Set Column Value based on Other Column Value
Post by ScottSutherland on 06/07/10 at 12:08:40

Greetings!

I've set one or two folder rules based on samples, so I am very inexperienced at it.  I really don't have time to try to learn all the syntax of rules or LUA, and I'm not even sure which to use.  I'm hoping that somebody who knows this stuff really well can take a few seconds or so to help me set something up.

Here's what I have (related to this problem):

A pop-up list called "Site" with several different values.
A "Net Location" column

Here's what I need to do:

If the value of the Site column is "DWP", I want the Net Location column set to "C:\Users\Scott\Documents\Websites\DurableWoods\DurableWoods.com\index.php"

Once I know how to do that, I can set it up to put different values in the Net Location field, based on different values in the Site field.

Thanks in advance!!

Scott :-)

Title: Re: Set Column Value based on Other Column Value
Post by Admin on 06/07/10 at 19:35:58


maybe start here: http://forums.eccoMAGIC.com/forum/YaBB.pl?num=1195222863/2#2


also look at http://eccowiki.com  and see examples, etc...



Title: Re: Set Column Value based on Other Column Value
Post by ScottSutherland on 06/08/10 at 12:41:15

Hi!  Thanks for the response, but I'm still feeling pretty lost.  I'd already viewed the stuff in the Wiki, so that wasn't very helpful to a rookie like me.  The imatch function looks like it might be what I need, but I'm at a loss as to how to make it look at the value in "column a", and set the value in "column b" based on what it sees in column a.  If you (or anyone else) is familiar with the functions & syntax, could you just show me the code that would do this:

If columnA="ABC" then columnB="123"
else
If columnA="DEF" then columnB="456"
else
If columnA="GHI" then columnB="789"
endIf

I'd be most grateful :-)  I'm pretty good at understanding how things work based on examples I understand, but I've yet to find an example that does the whole "set column value based on another column value" thing.

Thanks!

Scott <><

Title: Re: Set Column Value based on Other Column Value
Post by Admin on 06/09/10 at 16:35:42


1. find the IFF( )  command on the wiki.  You can use it compound eg,

++:+!: iff(gfv("folder1") = 3,"MATCH",iff(gfv("folder1" = 4,"MATCH4","NO MATCH"):[folder1]


but easier to use above link example for indexed lookup.

Title: Re: Set Column Value based on Other Column Value
Post by ScottSutherland on 06/10/10 at 11:44:12

Thanks again!  Help me with your example.  Each reference to a folder is "folder1".  So how does that look for something in one folder (column) and set a value in a DIFFERENT folder (column)?

Title: Re: Set Column Value based on Other Column Value
Post by Admin on 06/10/10 at 16:23:54



auto assign rule in any folder sets the values for *that* folder.

so if rule is in folder 2  it can set value based on folder 1.


suggest again to look over the tutorials on the eccowiki.


start with something simple,

folder1  with rule ++:!+:[folder2]:[folder2]

and then see what happens when you add values to folder2 for different items.

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