+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Multiple Tags in FilterExpression

Multiple Tags in FilterExpression

6 posts, 0 answered
  1. Dave
    Dave avatar
    76 posts
    Registered:
    10 Mar 2008
    04 Mar 2009
    Link to this post
    Hi,

    We are trying to use the ContentView control to create a list of Generic Content that belongs to one category and multiple tags all at once.  It seems to be returning Generic Content that belongs to the one category and either of the two tags specified.  This is the Filter Expression we are using:

    Category = "Client Panel" AND Tag.Name = "DotNetNuke" AND Tag.Name = "Web Design and Development"
    Semantically it seems like it is performing the following filter instead:

    Category = "Client Panel" AND (Tag.Name = "DotNetNuke" OR Tag.Name = "Web Design and Development") We are using Sitefinity 3.5.  Are we doing something wrong or is this a bug?

    Thanks,
    Dave

  2. Stoyanka Assenova
    Stoyanka Assenova avatar
    113 posts
    Registered:
    01 Dec 2016
    05 Mar 2009
    Link to this post
    Hi Dave,

    You can use this example: FilterExpression Multiple tags

    If you have any problems, don't hesitate to contact us.

    Greetings,
    Stoyanka Assenova
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Dave
    Dave avatar
    76 posts
    Registered:
    10 Mar 2008
    05 Mar 2009
    Link to this post
    Hi Stoyanka ,

    Are there any plans to allow this kind of Filter Expression?  If not can I request it as a feature?

    Thanks,
    Dave
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    05 Mar 2009
    Link to this post
    Hello Dave,

    Currently the only way I could come up with is by using intersection as my example shows. Using the default filter form the control designer (or programmatically) pass only the last tag nevertheless you have specified more than one. Filtering by multiple tags will be available from version 4.0, where we will improve the API.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. Steve
    Steve avatar
    16 posts
    Registered:
    14 Jul 2010
    05 Dec 2011
    Link to this post
    Now that 4.0 has been out for a while can you please post and example of using a filterExpression with multiple tags?
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    06 Dec 2011
    Link to this post
    Hi Steve,

    Here is a sample that you can use in the control designer of the control

    • Visible = true AND Status = Live AND Tags.Contains("{CAEE342B-EFBB-4FF9-A933-C634CD7C814A}")
    • Visible = true AND Status = Live AND (Tags.Contains("{CAEE342B-EFBB-4FF9-A933-C634CD7C714A}") OR Tags.Contains("{AECC42B-EFBB-4FF9-A933-C634CD7C814A}") )


    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
6 posts, 0 answered