mlapl1
Posts: 66
|
| Posted: 02/07/2009, 2:39 PM |
|
Hello
I am very rusty with CCS and was never very fluent anyway - but the help in this forum has always been great.
I would like to display the rows in a grid only if one of the fields in the particular record is set to 'yes'.
More precisely, I would like to add a field to my database called "Published". If the value of that field is "yes" or "y" or whatever, then it is ok to show the whole row in a grid. Otherwise, i do not want the row displayed.
How could I go about implementing this? I was thinking that something had to happen in the grid at the "Before Build Select" stage (perhaps with custom code) or the Before Show Row stage. But how to code it etc??? I would appreciate any clue. I am trying to work in PHP.
|
 |
 |
datadoit
|
| Posted: 02/07/2009, 2:42 PM |
|
Put it as a WHERE parameter in your grid data source.
|
|
|
 |
mlapl1
Posts: 66
|
| Posted: 02/07/2009, 4:16 PM |
|
Thank you for your answer. I have attempted to do that - adding it to the list of where parameters already existing.
However, the grid expects values sent to it by the search form. I would like the comparison to be made with a literal - actually the char "y" (without the quotes), hard-coded in the where clause. I have tried everything but cannot get the comparison to work. I think it must be the way I am trying to express the literal.
Any clues gratefully received.
Andrew
|
 |
 |
damian
Posts: 838
|
| Posted: 02/07/2009, 7:02 PM |
|
change "type" to expression
if using characters/words to match enclose in ' '
_________________
if you found this post useful take the time to help someone else.... :)
|
 |
 |
|