This topic is locked

"show all" button

12/20/2011 3:04:53 PM
ASPRunnerPro General questions
R
rayjgraham author

I need to understand how to program a button to set a session variable and then check/read that variable to either skip or run a sql statement on the List page:Before sQL query event.
my "show all" button is located on the project_list.asp.
Client before code...
params["txt"] = "Hello";

ctrl.setMessage("Requesting to show all Projects...");
Server code...
set Session("showall")="on"

result("txt") = "Showing all Projects"
Client After code...
ar message = result["txt"] + " !!!";

ctrl.setMessage(message);

location.href="Projects_list.asp"
i have the following code on the List page:Before process....

Response.Write Session("showall")
i have the following code on the List page:Before SQL query....
dim flag
if session("showall")<>"on" then
if SESSION("userid")="US\rgrahamj" or SESSION("userid")="US\raparker" or SESSION("userid")="US\jmack025" then

flag=1

strSQL = "SELECT FROM dbo.Projects WHERE (status = 'Open' OR status = 'On-Hold') ORDER BY assigneeUID,priority"
end if
if flag<>"1" then

if SESSION("userid")="US\hposton" then

strSQL = "SELECT
FROM dbo.Projects WHERE assigneeUID = 'hposton' AND (status = 'Open' OR status = 'On-Hold') ORDER BY priority"

end if

if SESSION("userid")="US\drolan" then

strSQL = "SELECT FROM dbo.Projects WHERE assigneeUID = 'drolan' AND (status = 'Open' OR status = 'On-Hold') ORDER BY priority"

end if

if SESSION("userid")="US\tmoore07" then

strSQL = "SELECT
FROM dbo.Projects WHERE assigneeUID = 'tmoore07' AND (status = 'Open' OR status = 'On-Hold') ORDER BY priority"

end if

if SESSION("userid")="US\twilli24" then

strSQL = "SELECT FROM dbo.Projects WHERE assigneeUID = 'twilli24' AND (status = 'Open' OR status = 'On-Hold') ORDER BY priority"

end if

if SESSION("userid")="US\dbarino" then

strSQL = "SELECT
FROM dbo.Projects WHERE assigneeUID = 'dbarino' AND (status = 'Open' OR status = 'On-Hold') ORDER BY priority"

end if

end if

end if

Sergey Kornilov admin 12/21/2011

It looks like you assigning the value to this session variable the right way.
What exactly doesn't work? Any error messages? You can post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.

R
rayjgraham author 12/22/2011

here's the ticket info....

ticket ID#247424 need help with a "show all" button on the list ... 12/22/2011 11:07:23 AM
thanks so much for the help.

Sergey Kornilov admin 12/22/2011

Answered to your personal email address - waiting for additional info.

R
rayjgraham author 12/27/2011

the info you requested has been sent.
thanks,

Ray

Sergey Kornilov admin 12/27/2011

Resolved after server side code fix.
Incorrect:

set Session("showall")="on"


Correct:

Session("showall")="on"