[Need Help] Sorting and filtering confusion

Hi, I am trying to search, filter and a list of books, by 3 constraints:

  1. Search by Title contains keywords
  2. Filter by Genre contains genres from multidropdown
  3. Sort by one of 4 options - created date ascending, created date descending, votes ascending, votes descending.
  • The genres are in an option set, and the user can select multiple genres.

I have managed to get it to search based on the “Title contains keywords” and the sort, however I can’t work out how to filter by genres.

Q1) How do I get the genre filter?

Q2) Is there a better way that I should have used for the whole of this anyway?

Thanks!

Can’t sort by related fields. Can just put text field into data type to store genre value and then can sort.

1 Like

After “Search for Books” click (More…) and add “filter” their you can select a field but you should select “Advanced”. Then you will be able to say “Multiselect filter genre’s value contains This Book’s genre”.

1 Like

Hi William, so when I try to do that, I get an error…

Hi Boston, sorry, what do you mean by

?

Thanks, A

Your multiselect Genre, can you post a screen shot of that element editor. You need to be sure that the values are of type genre and also the field of book was of type genre too. Neither need to be text.

1 Like

This is the Genre element editor.

Not sure which you are referring to for the

  • do you mean the repeating group? The data source for that is currently search for books…

No, when you say This Book’s Genre. In that phrase is Genre being saved as a Genre or as a text? The only reason you would be getting an error is if one is a genre and the other is text. They all need to be the same type to work.

1 Like

Ah, I see.

The Genre option set is a Genre, and the Genre field in Book is a list of Genres…

Even when adding a new book, Genre is genre

Unless you mean somewhere else?

Ok so that is it. Since Genre on Book is a list and you are comparing to a list of Multiselect Genre then the way it was worded earlier would not work. Do you want it to show if any of the genre on book are in the Multiselect Genre’s value?

This topic was automatically closed after 70 days. New replies are no longer allowed.