Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

user ID

Locked
Mx32
Posts: 4
Joined: Tue May 15, 2012 10:15 pm

user ID

Unread post 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
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: user ID

Unread post 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
Mx32
Posts: 4
Joined: Tue May 15, 2012 10:15 pm

Re: user ID

Unread post 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#")
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: user ID

Unread post by admin »

Cool!

Steven
Locked