List Filters; What's the magic formula

15 years 2 months ago #89486 by GuiGuy
The table contains a user defined field 'cb_comweb'. It is a boolean field, in the mysql sense. the mysql records show the field values to be 0 for FALSE and 1 for TRUE

Filtering on this field ought to be db 101, but try as a might, using simple or advanced filters in CB lists (v1.2) I get nothing :(

the advanced string should be, AFAIK after years of playing with mysql, be
`cb_comweb` = TRUE
or
`cb_comweb' = 1

Even preparing the WHERE part of the query in PHPmyadmin and copying and pasting it doesn't work.

I'm exhausted.

Can anyone help me on this, even if only to confirm that the filters just don't work.

Thanks

Post edited by: GuiGuy, at: 2009/02/22 06:32

Please Log in to join the conversation.

15 years 2 months ago #89504 by nant
Just tried it.

Works just fine like this:

`cb_yesno` ='1'

Please Log in to join the conversation.

15 years 2 months ago #89547 by GuiGuy
Replied by GuiGuy on topic Re:List Filters; What's the magic formula
nant wrote:

Just tried it.

Works just fine like this:

`cb_yesno` ='1'


Thanks for the reply.

I think I have worked out why I have been struggling with the filters.

In each case where I have had issued it's been with a custom field. In each of those cases I had gone back and re-edited one or more of the field's definitions. It seems when the field assigns values, such as multi checkboxes and selection lists, the values in records may be reset if the definition is changed (?).

So, where I thought a value existed, the field actually held null.

To paraphrase Monty Python, "what a cilly bunt I am" :pinch:

Anyway, guilty.

Thanks again.

Please Log in to join the conversation.

15 years 2 months ago #89549 by nant
Having gone back and modified the database on your own is a vital piece of information that should have been revealed.

It is not fair to post a statement that list filtering doesn't work and then two posts later reveal that you have been editing the database manually.

Please Log in to join the conversation.

15 years 2 months ago #89551 by GuiGuy
Replied by GuiGuy on topic Re:List Filters; What's the magic formula
nant wrote:

Having gone back and modified the database on your own is a vital piece of information that should have been revealed.


No, I re-edited a custom field using the CommunityBuilder field manager/ editor, ie COMPONENTS > COMMUNITY BUILDER > FIELD MANAGEMENT. The fields I re-defined were the same fields that I was testing for a value in the filter. I didn't realise at the time that re-defining a field in the field manager resets any values to null. I assume the custom field is deleted and re-created when re-defined?

If I had hacked or altered data tables or dictionary I would have mentioned it at the outset. In fact, out of embarrassment I wouldn't have mentioned anything at all ;)

Please Log in to join the conversation.

15 years 2 months ago #89566 by nant
GuiGuy wrote:

nant wrote:

Having gone back and modified the database on your own is a vital piece of information that should have been revealed.


No, I re-edited a custom field using the CommunityBuilder field manager/ editor, ie COMPONENTS > COMMUNITY BUILDER > FIELD MANAGEMENT. The fields I re-defined were the same fields that I was testing for a value in the filter. I didn't realise at the time that re-defining a field in the field manager resets any values to null. I assume the custom field is deleted and re-created when re-defined?

If I had hacked or altered data tables or dictionary I would have mentioned it at the outset. In fact, out of embarrassment I wouldn't have mentioned anything at all ;)


You cannot change the fieldtype of a field after initial creation.

At least not via the CB Field Management interface.

If all you changed were the allowable values, then of course existing values would remain in the database and only edits or new users would be forced to use the newly specified allowable values.

So this might be the case.

Post edited by: nant, at: 2009/02/23 11:50

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.186 seconds

Facebook Twitter LinkedIn