Charles
|
| Posted: 03/08/2002, 2:27 PM |
|
Limiting the display based on right page redirection
Description How does CC limit the dropdown of an SQL statement
for instance COMPANIES belonging to ONE TABLE have
PROJECTS belonging to ONE COMPANY and USERS having
DIFFERENT ACCESS LEVELS are assigned to THESE PROJECTS.
What CC is doing is allowing ALL users TO BE
displayed and assigned to that PROJECT, what if
USERS are assigned to WRONG PROJECTS belonging
to different companies.
Where can I place and regenerate my SQL statement
Select data from table where projectid required and
company id and login id required are these sessions
because I tricked CC on CompanyID login on Custom Show...
Suggestions please?
|
|
|
 |
Andrew B
|
| Posted: 03/08/2002, 9:00 PM |
|
The easiest way I can see to do this is to construct a custom SQL statement that gives the desired result set. Go into the listbox properties, and under join you should see Custom SQL. Create the query as needed here, but follow these rules :
It MUST return two columns. The first one is the 'Value' of the select (usually the ID) and the SECOND is what displays. Ex : Select PersonID, PersonName FROM PersonTable WHERE <where condition>.
If you need to embed passed parameters, you can do it like this in the box :
->"SELECT ... blah ... blah WHERE CompanyID = " & GetParam("CustomerID") & " <-
Notice that you have the [ & " ] at the end. This is because it sticks it in the asp as a string. Basically, CC will stick a quote before and after what you enter, so you have to acount for that.
I am still a little unclear on what you need to display exactly, or what problems you are having, but this should work as long as you can construct a SQL query that returns the data you are interested in.
|
|
|
 |
Pavle
|
| Posted: 08/30/2002, 1:43 AM |
|
Can ...blah ...blah also be passed as parameters like
"SELECT ' & GetParam("Col1") & ',' & GetParam("Col2") & ' FROM ' & GetParam("TAb1") & 'WHERE CompanyID = " & GetParam("CustomerID") & "
something like that?
|
|
|
 |
oberoncat
|
| Posted: 09/17/2002, 8:16 PM |
|
Hi I wanted to do something similar to what you are after but in jsp
In the where clause I have something like
where customer = session.getAttributes("client") but this returns compiler error
what am I doing wrong ?
thanks
|
|
|
 |
|