On your login page you'd set the session variable.
 
If the login is successful.....
 
<cfset session.views = "#queryName.Division#">
 
 
 
 
Then you'd use the following on the page that displays the documents
 
<CFQUERY name="docs" datasource="intranetv8">
SELECT docid, doctitle, docsummary, docpath, docView_type
FROM itdocs
WHERE category2='#URL.category2#'
AND
views='#session.views#'
OR
views = 'all'
</CFQUERY>
 
 
Any of the "big dogs" please correct me if I'm wrong ;)
 
 
Candace K. Cottrell, Web Developer 
The Children's Medical Center 
One Children's Plaza 
Dayton, OH 45404 
937-641-4293 
http://www.childrensdayton.org
 
 
[EMAIL PROTECTED]

>>> [EMAIL PROTECTED] 12/3/2002 10:00:03 AM >>>
I am still using Coldfusion 4.5, so CFMX is not a practical solution in
the
short term.

So from what has been suggested.

Yes I have a field called views in the documents (itdocs) table.  When
they
add the document through a html form there is a select box field with
3
options the user has to select

<option value=teama>Available to Team A</option>
<option value=teamb>Available to Team B</option>
<option value=all>Available to Everybody</option>

The value they select populates the views field in the documents
(itdocs)
table.

When you state you can set up a session variable.  Where would this
value
come from?

In the user table holding their profile information there is a field
called
division.  This contains either Teama or Teamb for each user.

So could this be used?


And is the above the most efficient way of creating as Ben Forta calls
it
Explicit Personalization ?? or are there better more elegant approaches
of
achieving the above?  Because the same (i.e. who is able to view the
content) would have to be done for when a user adds a record to the
download
table or a news article.




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Reply via email to