Solved

Coldfusion SELECT Options

Posted on 2007-03-28
3
228 Views
Last Modified: 2013-12-24
Coldfusion Question SELECT option
I have the following code:
<TD>Fruits</TD>
<cfinclude template="/market/diff_fruits.cfm">
<TD colspan="4">
      <SELECT name="available_fruits">
              <option value="">
         <cfoutput query="diff_fruits.cfm">
             <option value="#code#" >#description#
         </cfoutput>
      </SELECT>
The Query pulls the following records:
Code             Description
B                   Banana
A                   Apple
O                   Orange

I want to base the selections on certain users.  Like User A can only pick Banana and Apple while user B can only pick Orange.  Or User A can see all options but Orange is grayed out.


Any help is appreciated.  Thanks!
0
Comment
Question by:jramos74
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
bwasyliuk earned 500 total points
ID: 18817229
Hi,

From the code included so far - it is hard to tell whether your database or user security structure even supports this functionality.  What criteria about a user should restrict or define their access to the given options?

Example: UserA is a member of Group1, UserB is a member of Group2 (groups would likely be another table).
Your Fruits table would need to have a bridge to the Groups table to restrict access by group to the different options.

If you want to explain a little more about your structure, I am happy to assist.

Ben
www.ScheduleForce.net
0
 

Author Comment

by:jramos74
ID: 18817577
Thanks, Ben.  I know my explanation was not clear.  But I did figure it out.  
0
 

Author Comment

by:jramos74
ID: 18817588
Thanks again for your time looking at it.  
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question