Page 1 of 1

Browse Screen display rows conditionally

Posted: Wed Nov 28, 2018 7:52 am
by Martin
How can I do this: Each user only sees his own entries but the globadmin and all users with the role "super" see all entries (of all users).

Re: Browse Screen display rows conditionally

Posted: Thu Nov 29, 2018 6:12 am
by admin
Martin,

You can do this by using Hash Cookies in the Browse SQL of the Form properties.

eg.

Code: Select all

SELECT * FROM customer 
WHERE cus_employee_id = '#USER_ID#'
OR '#USER_GROUP_ID#' = ''
https://wiki.nubuilder.cloud/ ... sh_Cookies

If you want to know which Hash Cookies are available you could add this to the Before Browse event of the same Form.

Code: Select all

nuDebug(nuHash());
And check it in the Debugger.

Steven