Show specific reports in a read-only grid

I have two record types:

1. Asset

2. Match Report

The Assets have a one-to-many relation with the Match Report

I want to show an Asset specific grid where it shows all the Match Reports of that Asset

I have created a read-only-grid where I query that the assetId should match the match_report.asset.assetId

This only works if the Asset has a minimum of one Match Report created

If there are no match reports available linked to the asset, the query will fetch all match reports from all assets and show them in the grid.

Can someone help me to make sure the grid is empty if there are no match reports available? 

This is my query in expression: 

a!queryLogicalExpression(
  operator: "AND",
  filters: {
    a!queryFilter(
      field: "asset.assetId",
      operator: "=",
      value: ri!AM_Match_Report.asset.assetId
    )
  },
  ignoreFiltersWithEmptyValues: true
)

  Discussion posts and replies are publicly visible

Parents
  • It looks lilke "ignoreFiltersWithEmptyValues: true" is causiing the query to return all "Match Reports".  What variable are you storing the selected assetId in from the Asset Grid?

    Can we see more code?

  • Hi Bryant, I have tried setting "ignoreFiltersWithEmptyValues" to false. This is the error I am getting: 

    Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error at function a!gridField [line 2]: Expression evaluation error at function a!queryLogicalExpression [line 34]: The a!queryFilter function has an invalid value for the “value” parameter. When the value of “operator” is “=” “value” must not be null or empty.

    The selected assetId is coming from the Asset that the user has selected to view the match reports on

Reply
  • Hi Bryant, I have tried setting "ignoreFiltersWithEmptyValues" to false. This is the error I am getting: 

    Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error at function a!gridField [line 2]: Expression evaluation error at function a!queryLogicalExpression [line 34]: The a!queryFilter function has an invalid value for the “value” parameter. When the value of “operator” is “=” “value” must not be null or empty.

    The selected assetId is coming from the Asset that the user has selected to view the match reports on

Children