nblgeoweb VIP
Total posts: 178
10 Dec 2013 15:35

I have a category with records of two different types in it and in the same record listing. Both types have a field by the same name with the same options available in that field. The field value is filterable and is displayed for each record in the list of records.

When I click on a filterable value in the record list, two filters are applied - one for the type and one for the field value. Is there a way to not have the "type" filter automatically added? I want to have a record list that is filtered by the selected field value but includes both types of records.

Last Modified: 02 Mar 2014


nblgeoweb VIP
Total posts: 178
10 Dec 2013 17:16

Here's some additional information... If I click a filterable field in my record listing, I get two filters: "Of Type" and the field I clicked on. If I then do a text search, I get a filter for the text search and a second filter labeled "Of Type" with the filter value being "Array" and no matching records. The filter for the filterable field disappears. If I then delete the "Of Type" filter, my filterable field filter comes back and the record listing is correct. If I could prevent the "Of Type" filter from automatically coming up, the problem would go away.


Sergey
Total posts: 13,748
11 Dec 2013 06:02

When I click on a filterable value in the record list, two filters are applied

Unfortunately in this case we cannot avoid to add type to filters. That is because there we do not know how many types are there with the same field name. You will probably need to turn filter links off. And use only advanced search filters.

When I click on a filterable value in the record list, two filters are applied

Here's some additional information...

Without changing anything, give us in private comment admin level credential to your site to check it out. And give exact instruction on what page you click what with links.


nblgeoweb VIP
Total posts: 178
11 Dec 2013 08:03

In my case I actually want to have a field with the same name to include filter results across all types. I guess in an ideal situation, it would be nice to define a field as unique for filtering (include type) or not but I don't need to do that in this case. All I need to do is turn off the inclusion of a type filter when selecting a filter link.

Thanks for the offer to check my site for me. Unfortunately it's behind a firewall I don't control. I'll try to give you some exact steps to help:

  • record listing template is "simple"
  • two types: Type A and Type B
  • both types have a radio field called "myfield" that has two values, 1 and 2
  • both types have a text field called "description" that is searchable but not filterable
  • myfield filtering is enabled and Field Value Linkage = Value as filter link
  • I click the filter link for "myfield" in the record listing and I get two filters: Of Type = Type A and Myfield = 1
  • I then enter some text in the search box (markup layout template = default) and hit enter
  • I now have two filters - Of Type = "Array" and Search Text = my search string with no filter results even though there should have been. The "myfield" filter is now gone
  • I delete the "Of Type" filter and the myfield filter comes back - now there are two filters: myfield and search text, with the correct filter results.

Something seems to be broken with the "Of Type" filter when records of multiple types are present in a category.


Sergey
Total posts: 13,748
11 Dec 2013 23:10

You can only fix it with hardcode.

As I say, Cobalt architecture does not allow me to know if the field is the same across all section types. I only know if there is only one type or many types in section. So it either render filter link for field or for field and type.

I could not reproduce error with "Array" locally. Unfortunately in this situation there is very little I can do to solve it.

Anyway I made some changes in the code. Hope it will be fixed in updated version released later today.


pepperstreet VIP
Total posts: 3,837
12 Dec 2013 04:46

As I say, Cobalt architecture does not allow me to know if the field is the same across all section types. I only know if there is only one type or many types in section. So it either render filter link for field or for field and type.

Maybe a "dumb designer" question... and maybe not related technically. (But from my limited point of view)

How does it work for "sorting" multi-types with same field name. Sorting seems to respect the same field name, no matter where the field belongs to.


nblgeoweb VIP
Total posts: 178
12 Dec 2013 07:16

When I remove the Of Type filter that gets automatically added, I get the results I want. I'll hunt through the code and see if I can find a way to disable it.


nblgeoweb VIP
Total posts: 178
13 Dec 2013 08:07

In followup to pepperstreet's comment, filtering also respects multi-type listings, as long as the "Of Type" filter is also not on and sorting multi-types for me also seems to work as expected.

Powered by Cobalt