Filter on child relationships

edited June 26, 2020 in Ideas
Thanks Ben, What I need to do is provide a way for the users to filter the records based on the values in the child relationship fields, rather than put a permant filter on them Note: This topic was created from a reply on the Combine records from detail objects topic.
0
0 votes

Awaiting Review · Last Updated

Comments

  • Anna WiersemaAnna Wiersema 🛠️ 
    edited December 13, 2019
    I don't think this is possible in Skuid right now, but I really want to do it. I'm starting this as an idea so we can vote it up.
  • Anna WiersemaAnna Wiersema 🛠️ 
    edited November 23, 2015
    Also! the ability to search on the values in child relationship fields would be very nice.
  • edited December 19, 2013
    is there any update on this topic? This very important for the project I am working on.
  • edited March 23, 2014
    I also need this feature for a table I need to build which will pull in information from 5 child objects
  • edited June 26, 2020
    Sean,
     What are the 5 child objects you need to pull in.... do you want to display data from 5 child objects, each in its own table..... or are you saying you want one table that combines 5 child objects ?
  • edited March 24, 2014
    I would like one table that combines 5 child objects. The main object is Policy which has a unique field called Policy Number and this field is common across the other 4 objects since all of them are related lists of Policy.

    On another note I do have use for your 1st reference( data from 5 child objects, each in its own table) all on one page
  • Rob HatchRob Hatch 🛠️ 
    edited September 12, 2019
    This update has been a long time coming.  We implemented various capabilities over the last 2 releases that make this possible. 

    You should probably start by adding child relationship fields to your table so you can test.  Look at Step 5 of this tutorial if you need help. 

    Now to build the filter.  I'm filtering our opportunities by the product name in the line items that are part of the opportunity.

    1. Create a subquery condition.   The first condition looks like this: 

    image

    Field: Opportunity ID 
    Operator:  IN
    Value:  Result of subquery,  Join object: OpportunityLineItem,  Field:  OpportunityID
    State: Filterable default off,   provide name of your choosing .


    2.  Create the subcondition.
     Select the "Add Block" icon next to the condition name.  The subcondition look like this:  

    image
    Field:  The field you want to filter on. 
    Operator:   Is
    Value:  Leave Blank
    State:  Filterable default off,  provided name of your choosing. 


    3.  Add a New Model that will provide Picklist Values.
       The SubCondition field will not be able to pass its metadata into the filter to create the picklist values.  So we have to create a model for picklist values.   I use aggreate models for this. 

    image

    Model properties: Advanced,   Choose Aggregate Model
    Don't choose any aggregations or conditions
    Groupings:  Choose the field name for your filter.   I adjust the alias so it is exactly the same as the field name. 


    4. Build the Filter.
      Add a filter to the table. 

    image
    A: Primary Filter properties. 
    Type:  Select Option
    Conditions to Affect:   The subquery condition (number 2 above)

    image
    B: Filter Source properties
    Source Type:  Rows in a model.  Choose the source model. 
    Important:  In "which conditions will this source option affect"  choose "Default Condition and others"
    This exposes a Coffee Cup Icon which you should push.

    image
    C: Additional Effects Propoerties: 
    Action:  Activate
    Condition:  The primary condition (number 1 above).





    5.  Enjoy your results.  
    Now you have a filter on the child data. 




  • Craig RosenbaumCraig Rosenbaum ✭✭✭✭
    edited November 12, 2015
    Is there anyway to use a multi-select filter on child relationships? I have the single select working, but really could use multi-select. 
  • Rob HatchRob Hatch 🛠️ 
    edited September 1, 2016
    There is not currently a way to to choose a child relationship field for a multiselect filter.  Sorry
  • Craig RosenbaumCraig Rosenbaum ✭✭✭✭
    edited November 12, 2015
    I know it can't be done via the page constructor, but could I edit the XML to accomplish it?

    Would it be possible to change the sub condition to be "in the set of values" instead of "is" and changed the filter to be multi-select in the XML?
  • Rob HatchRob Hatch 🛠️ 
    edited September 1, 2016
    Sorry Craig - this will not work.  This is not just somthing missing in the composer - its more fundamental code that is not in place at this point. 
  • Craig RosenbaumCraig Rosenbaum ✭✭✭✭
    edited November 12, 2015
    Gotcha, I understand.

    I do sometimes have issues with this way of filtering. When I go to clear the filter, it does not always clear correctly. And filtering on two different child relationships gives me inconsistent results as well. Have you seen this at all? I can go into more detail if need be.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!