[ic] if-statement for "dealer" field in userdb?

Jürgen R. Plasser plasser at hexagon.at
Fri Sep 26 00:57:20 EDT 2003

I am really curious about how to get this work:

I can get the field "dealer" in the userdb for a specific logged in user by 
the following statement:
[data table=userdb field=dealer key="[data session username]"]

How can I construct some decision based upon this data?
Really nothing I have tried works!

I tried explicit if:

[if explicit]
        $username = "[data session username]";
        $dealer = "[data interpolate=1 table=userdb field=dealer key='[data 
session username]']";
        return 1 if $dealer eq "1"; # tried all combinations...
        return 0;
    It's a dealer!
It's no dealer!

Or I have tried this perl thing:

   $user = $Session->{username};
   $field_from_db = $Tag->data('userdb', 'dealer', $user);
   return $field_from_db;

Nothing really works - but I need this one really urgent!

Maybe someone can help me, pleazzzze (before I get down on my knees)!

Thank you so much,

More information about the interchange-users mailing list