Request a cross join of unrelated tables

To request a cross join of unrelated tables, use the $crossjoin keyword and list the tables that you want to join. When using the $filter query option, specify each field used for joining the two tables.

Use the $expand query option and the $select query option to ensure that data fields are returned rather than the default behavior, which returns a list of record IDs. See "Addressing the cross join of entity sets" in OData 4.0 URL Conventions.

Note  A cross join is the only context where the $expand keyword is supported.

Component

Description

HTTP method

GET

URL

https://host/fmi/odata/version/database-name/$crossjoin(table 1, table 2)?$filter= (filter expression)&$expand=(expand expression)

host – FileMaker Cloud or FileMaker Server host name

version – the OData version, always v4

database-name – the name of the hosted database

table 1, table 2 - the name of the tables

filter expression - criteria for each record that determines whether the record is included in the results

expand expression - a list of tables and fields specified with $select that are included in the results

Example: /fmi/odata/v4/ContactMgmt/$crossjoin(Products,Sales)?

$filter=Products/ID eq Sales/ProductID&

$expand=Products($select=Name,Description),

Sales($select=CustomerName,PurchaseDate)