locked
Adding an "all" option to a report filter RRS feed

  • Question

  • Is it possible to create a filter in FetchXML which will filter data based on either a value specified by the user or, if no value is specified, to fetch all data

    So for example in FetchXML statement to populate a dataset I have the filter;

       <condition attribute="fullname" operator="eq" value="@Engineer" /> 

    Where Engineer is selected by the user froma  drop list of all users. Ideally I want an "All" option on that drop list and if the user selects "All" then return all data, i.e. remove the filter from the FetchXML or bypass it something like

    <filter "or">

       <condition attribute="fullname" operator="eq" value="@Engineer" /> 

       <condition something="@Engineer" operator="eq" value="All" />

    </filter>

    obviously that won't work but that's the ssort of effect I am trying to achieve. Is this possible? or would I need multiple reports?

    Wednesday, April 30, 2014 2:36 PM

All replies

  • Hi,you can execute the fetchXML in JScript and remove filter condition when user selects "All" Value.

    http://blog.customereffective.com/blog/2011/05/execute-fetch-from-javascript-in-crm-2011.html

    Bye

    Alessandro


    Alessandro Graps

    Friday, May 2, 2014 2:50 PM