What is the best practice for passing a filter from a record in a record type list to the record dashboard?

What is the best practice for passing a filter from a record in a record type list to the record dashboard? We only want to show data in the record dashboard that meets filter criteria from the selected record, understanding that data in the dashboard UI can originate from other sources besides the record type, i.e. record type field = "A" and we want to pass "A" as a filter into other expressions that query other tables of relevant information. Do we simply insert this SAIL expression in the query expression, or is there some guidance elsewhere that will tell us what to do?:

queryrecord(
recordtype: some constant
query( type!Query(
'logicalExpression|filter|search': type!QueryFilter(
field: the dot notation of the other non record type field to apply the filter (looking for "A")
operator:=
value: the name of the record type field to use as the filter...what's the syntax

thanks...
...

OriginalPostID-75019

OriginalPostID-75019

  Discussion posts and replies are publicly visible

Parents
  • I actually have this working now based on just using the value: rf!id since my recordtype entity has a field called id and this same field (key) is in the child table. Not sure what role rp!id has or how to use it yet. Now that I have this working I still get an error on list items that have no child data: Invalid index: Cannot index property 'ID' of type Text into null value of type List of Variant. Any design suggestions to get around this error when there's no child data generated by the query?
Reply
  • I actually have this working now based on just using the value: rf!id since my recordtype entity has a field called id and this same field (key) is in the child table. Not sure what role rp!id has or how to use it yet. Now that I have this working I still get an error on list items that have no child data: Invalid index: Cannot index property 'ID' of type Text into null value of type List of Variant. Any design suggestions to get around this error when there's no child data generated by the query?
Children
No Data