Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

Filter Subgrid View by Fields on Current Record

  • 1.  Filter Subgrid View by Fields on Current Record

    GOLD CONTRIBUTOR
    Posted Apr 20, 2021 12:57 PM
    Edited by Rodrick Hales Apr 20, 2021 12:57 PM
    Without code development or JavaScript (low code), does any know how to filter a view on a sub grid (subgrid) by fields on the current record?

    I want to avoid using the "Only Related Records"  under "Set Properties" -> "Data Source" -> "Records" option set (Choice). Please see life-altering images below.
    Alter data source from view

    Filters selected by value (not by fields on current record)

    ------------------------------
    Rodrick Hales
    Software Consultant
    ------------------------------


  • 2.  RE: Filter Subgrid View by Fields on Current Record

    GOLD CONTRIBUTOR
    Posted Apr 21, 2021 02:49 AM

    If you mean you'd like to filter on the comparison of two equal option fields (i.e. two yes/no fields), I don't think this is possible.
    In general I would very much appreciate the option to use this in Advanced Finds, mostly date related -> if last contacted date Is greater  than due date (just as example). 



    ------------------------------
    Rogier Vriezen
    CRM Consultant
    Amsterdam, Netherlands
    ------------------------------



  • 3.  RE: Filter Subgrid View by Fields on Current Record

    TOP CONTRIBUTOR
    Posted Apr 21, 2021 06:08 AM
    Rodrick,

    Can you create a calculated field with the result being 'true' to whatever condition you are trying to match?  Or a workflow or flow that maintains a flag field for the condition you are trying to match, for example on create, change of Assigned, change of Owner, set flagfield1 = 'true' if Assigned = Owner otherwise set flagfield1 'false'.

    Its not as clean as being able to compare fields or use functions in advanced find, but i think it will work.

    Hope this helps,

    ------------------------------
    Jim Corriveau
    A.W. Chesterton Company
    Groveland MA
    ------------------------------



  • 4.  RE: Filter Subgrid View by Fields on Current Record

    GOLD CONTRIBUTOR
    Posted Apr 22, 2021 08:51 AM
    Thanks for all the responses. A cleaner way needs to be for this. The business rules allow setting of a field to a value in the form as follows. Why not filter subgrid? Time for a Powerapps Component (PCF) or web resource I guess.


    ------------------------------
    Rodrick Hales
    Software Consultant
    ------------------------------



  • 5.  RE: Filter Subgrid View by Fields on Current Record

    GOLD CONTRIBUTOR
    Posted Apr 22, 2021 10:19 AM
    Hi Rodrick,

    Just curious why you do not want to use ​"Only Related Records" option. It is meant for this purpose.

    Cheers,

    ------------------------------
    Junbin Duan
    Senior Application Developer
    National Research Council Canada
    Ottawa ON
    ------------------------------



  • 6.  RE: Filter Subgrid View by Fields on Current Record

    TOP CONTRIBUTOR
    Posted Apr 23, 2021 01:54 AM
    Edited by Niels Søgaard Lønberg Apr 23, 2021 01:58 AM
    Column comparisons became available in FetchXML (and Web API and SDK API) last year, so might be able to use that feature.

    @Mark Carrington has written a good blog post about the new(ish) feature here

    ------------------------------
    Niels Lønberg
    Digital Sales Specialist
    Semco Maritime
    ------------------------------



  • 7.  RE: Filter Subgrid View by Fields on Current Record

    GOLD CONTRIBUTOR
    Posted Apr 23, 2021 08:41 AM
    Using "Only Related Records" would mean I would have to find a way to related records in some way (create relationships). I want to avoid this and filter the data by criteria on the current record without relating the records.

    ------------------------------
    Rodrick Hales
    Software Consultant
    ------------------------------



  • 8.  RE: Filter Subgrid View by Fields on Current Record

    GOLD CONTRIBUTOR
    Posted Apr 23, 2021 08:42 AM
    Using "Only Related Records" would mean I would have to find a way to related records in some way (create relationships). I want to avoid this and filter the data by criteria on the current record without relating the records.

    ------------------------------
    Rodrick Hales
    Software Consultant
    ------------------------------



If you've found this thread useful, dive deeper into User Group community content by role