Page 1 of 1

user ID

Posted: Wed Jun 06, 2012 1:02 am
by Mx32
Hello,
I am new to nuBuilder.
I want to list in the Browse Form only the records that were created by the current user logged in. How can I do it?
Should I use zzsys_user_id()? How is this function used?

Thanks

Re: user ID

Posted: Wed Jun 06, 2012 3:56 am
by admin
Mx23,

You'll need to use a hash variable called #zzsys_user_id# in the WHERE part of the Form's SQL statement.
(http://wiki.nubuilder.com/tiki-index.ph ... erDocs#SQL)

This hash variable will be replaced with the id of the current user, before the sql is run.

You can find out more about hash variables and where you can use them here.http://wiki.nubuilder.com/tiki-index.ph ... uilderDocs

Steven

Re: user ID

Posted: Wed Jun 06, 2012 7:16 pm
by Mx32
Thanks for the info... I did it and works like a charm. I just had to put the hash variable between quote marks like this:

Code: Select all

WHERE sus_name=("#zzsys_user_id#")

Re: user ID

Posted: Thu Jun 14, 2012 1:37 am
by admin
Cool!

Steven