Have you looked to see if allSliders is returning the correct list of nodes?
the next thing I would look at is the Where clause, a multi node picker will return a list of node IDs in a coma separated list (1234,1235,1236). So is the where clause trying to see if any match and return that node to the list? or is it trying to return just that specific ID.
If you want to return the node you can check if Category contains the ID, like so:
var categorySliders = allSliders.Where(c => c.GetPropertyValue("Category", true).Contains(artId);
If you want to just return the ID you will have to split the category picker and put it to a list then return the correct ID from the list.
filter by property is not working
Hello,
I want to filter the children of one tree node using its property.
In document type I have in property called 'Category' which is multi node tree picker type property.
But it is not filtering data with specified condition. Please guide me where I am wrong? where the mistake?
Thanks, Dipa
Hello Dipa,
Have you looked to see if allSliders is returning the correct list of nodes?
the next thing I would look at is the Where clause, a multi node picker will return a list of node IDs in a coma separated list (1234,1235,1236). So is the where clause trying to see if any match and return that node to the list? or is it trying to return just that specific ID.
If you want to return the node you can check if Category contains the ID, like so:
If you want to just return the ID you will have to split the category picker and put it to a list then return the correct ID from the list.
this link should help if you are trying to achieve the latter: https://our.umbraco.org/documentation/getting-started/backoffice/property-editors/built-in-property-editors/multinode-treepicker
is working on a reply...