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
  • Bear with me because I'm not quite sure I followed.

    You want to have a record dashboard that pulls some data from some other record type.

    A concrete example of what I think you're looking for is navigating to a Customer record dashboard and seeing a list of Invoices (which is a separate record type). Assuming that you have not modeled your Customer CDT to have Invoices as a child field, you can effectively do a join the way you are describing.

    You would use the Invoices record type as the recordtype parameter to queryrecord and the filter would look something like this

    type!QueryFilter(
    field:"customerId",
    operator:"=",
    value:rf!Id
    )

    Where "customerId" is the name of the field on the Invoice CDT that corresponds to the customer, and rf!Id references the Id field of the Customer, which corresponds to the customer that is the context of the record dashboard.

    Make sense? Did I understand and answer your question?
Reply
  • Bear with me because I'm not quite sure I followed.

    You want to have a record dashboard that pulls some data from some other record type.

    A concrete example of what I think you're looking for is navigating to a Customer record dashboard and seeing a list of Invoices (which is a separate record type). Assuming that you have not modeled your Customer CDT to have Invoices as a child field, you can effectively do a join the way you are describing.

    You would use the Invoices record type as the recordtype parameter to queryrecord and the filter would look something like this

    type!QueryFilter(
    field:"customerId",
    operator:"=",
    value:rf!Id
    )

    Where "customerId" is the name of the field on the Invoice CDT that corresponds to the customer, and rf!Id references the Id field of the Customer, which corresponds to the customer that is the context of the record dashboard.

    Make sense? Did I understand and answer your question?
Children
No Data