Hi there,
Can’t find the way to use a list of IDs as a filter so curious if anyone knows the way and if there is a way
I have an HCMS that stores documents with two parameters: File Name and the Document itself. Based on my experience, I display this database as a list of toggle buttons, each representing a file name.
My goal is to allow users to select files by checking/unchecking them and then use this selection as a filter for the same database. For example, if I select files #1, 5, 6, and 10, I want to apply this as a filter in a different scene, so clicking a button would display only these selected files.
I initially tried using a shopping cart approach to collect file IDs, but I’m unsure if this can be used effectively as a filter in HCMS.
There can be different ways to approach this depending on what you are looking to do with the “filtered” list. Are you looking to just display the file name and document or are you looking to send(email) this to the user?
I would suggest contacting our support team so we can ask you to share your experience with us and better understand your situation.
Hi Ryan,
I’m looking for a feature that will let me pre-select files I will need later.
I open Scene A where I see the list of files (from HCMS) as toggle buttons (this will be for admins)
I select (check) all files that I will need (let’s say I pick 5 out of 50)
Later, I will open another Scene B that has a list of all files (the same files from the same HCMS). Here I want to place a button and when I click this button it should apply a filter to this HCMS to only show this 5 pre-selected files.
Let me know if it has sense. If not, I will create a ticket.
To accomplish what you described I think it would be best to use an Excel interface asset and add a toggle button to the Template group in your collection using the HCMS feed. This toggle button will add a row to the excel sheet, you can then use the excel sheet as the data feed in Scene B.
Here is how to set this up:
Add an Excel sheet that contains a column for the Item ID, File Name, and Document.
Add a toggle button to your HCMS Template group feed
Add an is checked trigger to the toggle button and have it add a row to the Excel sheet with the ID Number and File Name bound to the each item from the HCMS feed
To complete @rdriscoll Ryan’s answer, whether you use an Excel or an H-CMS data source, you can’t apply an OR filter.
To illustrate with examples
You can’t do an “Add Filter” => Column = ID, Operator = Equals or Contains, Value = 1 or 5 or 6 or 10 or…
You can do an “Add Filter” => Column = ID, Operator = Equals or Contains, Value = 1 => This shows only 1 item as a result of your filter
If you try to do an additional “Add Filter”, it behaves as an AND, so if call a new “Add Filter” (without resetting the filter first) with a Value of 5, as there are no items where ID = 1 AND ID = 5, you will get 0 results.
The idea that Ryan is suggesting is to dynamically build that list of selected items when you check / uncheck your toggle buttons. You can use an Excel file as Ryan suggested, or a component like our Shopping List where it might be easier to add / remove items on the fly.
As this is a bit of an advanced usage of collections, let me know if you’d like to discuss this in a call