This topic is locked
[SOLVED]

 BeforeDisplay EVENT

8/28/2010 10:53:42 AM
ASPRunnerPro General questions
E
Eddan author

Hi!
I´m trying to use a BeforeDisplay EVENT but i´m too stupid
I have 2 user accountgroups "Admin and "User"
I want to do as follows, If a user belonging to group "User" logs in, I dont want them to see "Closed cases", just "open cases" in the list page.
If a user who belongs to "Admin" group logs in, then the user should see both "Closed cases" and "Open cases" in the list page.
the values of the column "Case" is "open" or "closed".
how do I do this with an BeforeDisplay EVENT
best regards

Eddan

A
ann 8/30/2010

Eddan,
to display just opened cases for the user group use Before SQL query event on the Events tab.

Here is a sample:

if Session("GroupID")="User" then

strWhereClause = whereAdd(strWhereClause,"cases='open'")

end if
E
Eddan author 8/30/2010



Eddan,
to display just opened cases for the user group use Before SQL query event on the Events tab.

Here is a sample:

if Session("GroupID")="User" then

strWhereClause = whereAdd(strWhereClause,"cases='open'")

end if



Tnx Ann
That did it :-)
I was trying with BeforeRecordProcess event, and manage to hide closed cases,
but you bit of code was better, thank for your help
regards

Eddan