This topic is locked

Hiding Drop Down Values

4/23/2007 12:33:51 PM
ASPRunnerPro General questions
S
stealthwifi author

Hello,
I have a dependant drop down box system set up where if you select an account name it changes the values in the other drop down boxes, we will have clients that will be able to log in and view some of this information. I have it set up so when a client logs in they can only view reports for themselves, the problum is if they use the account drop down they will be able to see all the account names we work with. Is there any way with maybe a onload statement or something where I can limit it so the only value they see for the account drop down is there own. In order to limit what account reports they can see after log in I assigned each account a number i.e. 1 for bobs cleaning, 2 for Target.....
Thank you for you help!
Stealth-

Sergey Kornilov admin 4/23/2007

I would suggest to use WHERE condition in Lookup Wizard setup to display records that belongs to current user only.

S
stealthwifi author 4/24/2007

I have it set up with a GroupID in my login table and that corresponding GroupID in my Clients table so when the user goes to the Clients page (master page of Reports page) they can only see what is the same as there corresponding GroupID #. The linked dropdowns I mentioned above pull there list from a Criteria table that also has the Client names in it (as field Client) Any suggestions as to how i would set up the WHERE Condition for the lookup wizard, I tried using WHERE "Client = Clients.ClientName" and that pulls the whole list of names again and breaks the dependant drop downs.
Stealth-

S
stealthwifi author 4/25/2007

I think i might have found a solution, i added a GroupName to the Login table and would like to set that as a session variable at login, then use the WHERE statement with the drop downs to assign the drop down the sesssion variable.
I am having trouble with perhaps the syntax of the WHERE statement, i have:
"Client = ""& Session("GroupName") & "
I also tried adding
Session("GroupName") = rs("GroupName") in the login.asp &
SESSION("GroupName") = dbvalue(rs("GroupName")) in the login.asp (as that is how it looks in my complied login.asp page)
It keeps throwing out a syntax error, if I go into the include/commonfunctions.asp and modify the

strSQL =

statement then it lets me log in but throws out the same error for ClientView_List.asp

( I tried modding the strSQL = in ClientView_List.asp but that is worded very diffrently and beyond me how to change)
I would like to be able to fix all these things in the asprunner program, and i believe with the proper wording for the WHERE statement in the drop down area will fix this.
Any help is much apreciated -
Stealth-

S
stealthwifi author 4/25/2007

Ok after typing all that i think i have it figured out, normaly i would avoid typing so much here but i hope this all will be helpfull to others if they run into a similar problum.
I fixed the syntax for the WHERE statement it is now " Client = '" & Session("GroupName") & "'"
I also had to add the SESSION("GroupName") = dbvalue(rs("GroupName")) in the login.asp page.
The value if GroupName is being sent to the drop down correctly except now there is a error of

'arr_Group' is undefined

in ClientViewReports_search.asp
That is keeping the dependant drop downs from corectly changing.
Any ideas to a fix?
Stealth-

Sergey Kornilov admin 4/25/2007

Without seeing the actual code it's difficult to help.
Publish your application to Demo Account and contact me directly at support@xlinesoft.com.

S
stealthwifi author 4/25/2007

Without seeing the actual code it's difficult to help.

Publish your application to Demo Account and contact me directly at support@xlinesoft.com.


I published to the Demo account and sent you the email with how to reporduce the problum, thanks again for all your help! <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=17301&image=1&table=forumreplies' class='bbc_emoticon' alt=':D' />
Stealth-