[ic] UserDB custom field access?

Himem Inc interchange at himem.net
Sun Aug 17 13:22:27 EDT 2003


Jonathan Clark wrote:

>>I added a field to the userdb, and would like to be able to access this
>>in a webpage.  I have tried various configurations of the [userdb] and
>>[data] tags, but cant seem to get any data returned.
>>
>>[data session contacted]
>>    
>>
>
>This won't work. What you are asking for is a session variable called
>'contacted'. Of course, there isn't one.
>
>  
>
>>[data table=userdb column=contacted username="[data session username]"]
>>    
>>
>
>Here you are nearly right, except that there is no named parameter for the
>data tag called 'username'. You are using positional parameters and double
>quotes, which correct as you want to interpolate something being passed.
>
>
>  
>
>>[data table=userdb column=contacted key="[data session username]"]
>>    
>>
>
>This looks like the correct syntax - perhaps there is an interpolation
>issue? Have you tried:
>
>[tmp user][data session username][/tmp]
>[data table=userdb column=contacted key="[scratch user]"]
>
>Something which may be of use is the UserDB directive, where you can
>autoload your value into a scratch when the user logs in:
>
>UserDB  default  scratch  contacted
>
>Look for this directive in your catalog.cfg file and add your field to the
>list in inverted commas.
>  
>
I'm not sure what inverted commas are, but I have this:
UserDB    default    scratch       "contacted price_level credit_limit"

In my page I have:

[tmp user][data session username][/tmp] 
[data table=userdb column=dealer key="[scratch user]"]
[if scratch contacted]
Youve been contacted
[else]
You havent been contacted
[/else]
[/if]
[scratch price_level]
[scratch credit_limit]

The result is "You havent been contacted", and none of the other fields 
are printed out.



More information about the interchange-users mailing list