Skip to main content
chriss4489
April 25, 2023
Question

Filtering information in tabs on an interface

  • April 25, 2023
  • 10 replies
  • 0 views

I have a Summary view interface with tabs at the bottom that each display another Read-Only Grid interface displaying info from related tables. I need to be able to have the information on those tabs to only show the records related to the parent record being viewed on the summary view.  I know you can set filters at the Read-Only grid level on the individual interfaces, but at that point there is no parent record to reference so it returns an error. Does anyone have a way around this?

    10 replies

    April 25, 2023
    but at that point there is no parent record to reference so it returns an error

    Can you please clarify this statement ?

    You must be having record identifier (rv!identifier) or specific record data (rv!record) as a rule input in the summary view interface which you can use to pass filter in the grids of related records

    stefanhelzle0001
    Brainy
    April 26, 2023

    What do you mean with "but at that point there is no parent record"? Which point? Design time?

    You can make that filter conditional using the applyWhen parameter.

    jayaprakashr0001
    Participating Frequently
    April 26, 2023

    You should have parent record to filter the data based on parent record,

    If it is a child record try to get the parent id and pass it to the query rule to fetch the data and display the related data to the parent record.

    Can you share the screenshots for better understanding

    chriss4489
    April 26, 2023

    To answer the question you all asked, I meant at the point of designing the interface, there is no Parent record present. That statement may not make sense though. Regardless here is a screenshot of one of the listing interfaces. every time I try to set up a filter I get the error that the relationship path is null.

    April 26, 2023

    Can you share the snippet of filter you are trying to set up?

    chriss4489
    April 26, 2023

    This might provide more context also. This is the Summary Interface that the listing interfaces are being used. I need to filter the list showing in the tabs at the bottom of the interface to only show the child records associated with the parent record shown in the main part of the interface. Would that filtering be down at the List Interface level or somewhere on the summary interface? Note: we had to call interfaces into those tabs versus just adding read-only grids on the summary interface itself because we needed the added functionality of being able to select multiple records and delete multiple records, which as far as we know can't be done within the read-only grind component itself.

    April 27, 2023

    We got the whole context but were just requesting you to share what you have tried.

    You need to pass on the primary record's primary key to each of the child tab interfaces and there you will be querying only those child records which are associated with the primary record in the data parameter of gridField().

    For example in the queryfilter you pass something like,

    a!queryFilter(
      field: recordType!PSLM document.field.matterId,  /*related field for primary and child record*/
      operator: "=",
      value: ri!matterId,  /*from summary view interface*/
      applyWhen: a!isNotNullOrEmpty(ri!matterId)
      )

    chriss4489
    April 27, 2023

    I set up this record filter on the Document listing interface, where the field criteria is the primary key record as you mentioned. I believe it is working, for when I test the interface and put a 2 in the MainId input it returns 0 results because all the records are tied to MainId 1, but that is all I have in a way to test it for now. Is this not the same as what you did above? My expression mode does not show a section that looks like what you have, perhaps that is the difference? I appreciate your patience with this, I am still a novice with Appian but am under a deadline to figure this stuff out.