logo

New Response

« Return to the main article

You are replying to:

    • avatar
    • Alex
    • Posted on Tue 6 Jan 2004

    Hi Jake,

    Thanks for responding so fast!

    Yep, I have tried that and it does not work. It's like that @If is being ignored completelly, and then once the first @Implode gets a chance to be executed, all comments follow it's pattern.

    Say I have a Main doc and the following are responses: 1. John Smith 2. Anonymous 3. Anonymous

    Well, if I do @If ( Author = "Anonymous", @Im..), everyone including John Smith is treated as anonymous. And if I try to swith things around and set Author != "Anonymous", then all 3 users are displayed as if there are identified.

    How, and why do the values get stuck in the Author field?

    Initially, I set it as you demostrated in your sample:

    cAuthor := @DbLookup("":"NoCache"; ""; "(ThreadsRes)";MainID; 2);

    where the second column has all the Authors assosiated with the MainID of the doc. Then, I use the field in my html variables in the following manner:

    tr1 :=" <tr><some html here>" + cAuthor + "<some more html></tr>";

    tr1a :=" <tr><some html here>" + cAuthor + "<some anonymous html></tr>";

    and finally it's used on the @Implode:

    @If(ThreadMap!="";

    " [<tr><some html>"

    + @If( @Text(cAuthor) ="Anonymous"; @Implode( tr1a + tr2); @Implode( tr1 + tr2) ) ;

    "[<p>]")

    .. and I already told you about the results. I am missing something, right? The comments are all displayed correctly, but the conditioning does not work. I greatly appreciate it, if you can comment on such coding.

    Thanks! - Alex

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment: