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

Forums / Developing with Sitefinity / SF7: Backend Filtering of dynamic content types

SF7: Backend Filtering of dynamic content types

6 posts, 0 answered
  1. John
    John avatar
    6 posts
    Registered:
    03 Apr 2014
    28 Jul 2014
    Link to this post

    Hi everyone,

    http://www.sitefinity.com/blogs/stoimen-stoimenovs-blog/2012/08/30/filtering_dynamic_content_items_in_the_backend_grid_by_workflow_status

    I've followed the guide above to add a filter to the sidebar of the backend list view. I was successful in adding one filter (ex: Filter1), but when adding a second filter (Filter2):

    1. Clicking on Filter1 applies Filter2

    2. Filter2 is unclickable.

    Both Filter1 and FIlter2 has the same command name, button type, and type. They have different command argument, name, and commandtext. What could be the problem here?

    Best,

    John

  2. Junior Dominguez
    Junior Dominguez avatar
    115 posts
    Registered:
    02 Dec 2016
    01 Aug 2014
    Link to this post
    Hi John,

    Can you try by setting the Command Name to filter in both ?

    Also notice that those filters described in the blog post are included out of the box in Sitefinity 7.

    Best Regards,
    Junior Dominguez
    Telerik
     
    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 Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  3. John
    John avatar
    6 posts
    Registered:
    03 Apr 2014
    01 Aug 2014
    Link to this post

    Hi Junior,

    Command name for both is "filter". Bug still occurs.

    I want each filter to be filtering out a field for a module. Let say that field is year born.

    Filter 1 has properties of:
    Command name: filter
    Command argument: {filterExpression : "BirthYear == 2013"}
    Command button type: SimpleLinkButton
    Is filter command: checked
    Name: 2013 Filter
    CommandText: 2013 Filter
    WrapperTagName: Unknown
    Type: Telerik.Sitefinity.Web.UI.Backend.Elements.Widgets.CommandWidget, Telerik.Sitefinity

    Filter 2 has properties of:
    Command name: filter
    Command argument: {filterExpression : "BirthYear == 2014"}
    Command button type: SimpleLinkButton
    Is filter command: checked
    Name: 2014 Filter
    CommandText: 2014 Filter
    WrapperTagName: Unknown
    Type: Telerik.Sitefinity.Web.UI.Backend.Elements.Widgets.CommandWidget, Telerik.Sitefinity

    As shown in the screenshot attached. 2013 is selected, but the year being filtered is 2014. 2014 is unselectable.

    Best,
    John

  4. Junior Dominguez
    Junior Dominguez avatar
    115 posts
    Registered:
    02 Dec 2016
    06 Aug 2014
    Link to this post
    Hi John,

    Can you try instead the filter expression following this pattern? E.g:

    {filterExpression : "BirthYear= \"2013\""}
    {filterExpression : "BirthYear= \"2014\""}


    Best Regards,
    Junior Dominguez
    Telerik
     
    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 Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  5. John
    John avatar
    6 posts
    Registered:
    03 Apr 2014
    06 Aug 2014 in reply to Junior Dominguez
    Link to this post

    Hi Junior,

    I get the error "Operator '=' incompatible with operand types 'Decimal' and 'String'"

    Best,
    John

  6. Junior Dominguez
    Junior Dominguez avatar
    115 posts
    Registered:
    02 Dec 2016
    12 Aug 2014
    Link to this post
    Hi John,

    If the field is defined as numeric the syntax would be without the escaped quotations. E.g:

    {filterExpression : "BirthYear= 2001"}

    Otherwise if it is a short text ti would be like the following:

    {filterExpression : "BirthYear= \"2013\""}

    You can take a look to this video that shows an example using a numeric field.


    Best wishes,
    Junior Dominguez
    Telerik
     
    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 Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
6 posts, 0 answered