|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Mon May 10, 2004 11:16 pm
Alternating lines in #loopdb |
Ok here is my problem I have a #LOOPDB that I need every other line colored Alternativly but I can't figure out how to do it. and %i doesn't work in a loopdb
Unaltered
#loopdb test {%key}
So I tried %case hopeing it would work like #CASE ie if you have two values and you ask for the third it will return the first (or something along those lines) but %case only returns if the value exists.
Exp with %case(%iskey(var,%key)) //returns key number
#loopdb test {%case(%iskey(test,%key),Do,Dont) This}
returns this in a 4 record var
Do This
Don't This
This
This
Are there any other things I can try to do to make it output like this
Do this
Don't this
do this
don't this |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Tue May 11, 2004 1:50 am |
Simply use %mod.
#LOOPDB @test {#ECHO %if(%mod(%iskey(@test,%key),2),Do,Dont) %key} |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Tue May 11, 2004 3:31 am |
*WHAP* I swear I looked right at thank Thanks Vijilante.
|
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|