This sounds eerily familiar. I must have responded to it some days ago.
You could do it on 2 separate pages.
<option value="">Select option</option>
<option value="0">Not vApproved</option>
<option value="-1">Needs Approval</option>
<cfif isDefined("form.cboApproved") and form.cboApproved eq -1>
This sounds eerily familiar.
Yes, it does.
The SQL column has this as a bit value so a Case adjustment does not work.
Could you elaborate? Because it seems a bit convoluted. Just wondering if there is a simpler way to go about it.
Well seeing as the previous thread seems to have been wiped off the face of the earth and started again, I'll add a point I added last time.
If you're doing your queries in-line on the page as it would appear, why the need to name them differently? Why not have the switch/cfif *inside* the cfquery tag, so it's just the results of the query that vary? The idea of having them named differently surely just means you're going to have to duplicate the case logic at the display end? I had a need for something similar the other day, and did something like this:
<cfif client.isManager >
<cfset qWhatever = application.Managers.get('Staff').getAll() />
<cfset qWhatever = application.Managers.get('Staff').getById(client.id) />
That way whatever has happened, you end up with a queryset of the same identified. Unless I missed something in the previous elusive thread of course.
Regarding, "Well seeing as the previous thread seems to have been wiped off the face of the earth and started again,"
It's still under General Discussions and still on the first page. It is however, below the bottom edge of your monitor.
This one did not start again. The OP posted the same question in two forums at about the same time.
Regarding the suggestion of doing the conditional logic inside the query tag, while there is nothing wrong with that, it's not my preference. My own style is to:
set variables, which includes any necessary conditional logic
do what you need to do afterwards.
In this particular case, I would still have just one query as you suggested. However, the sql would be a variable.
Indeed. I did also ask myself whether it was just one query, plus, say, an adjusted where-clause, or two entirely different queries. Which one is it, Brian?