Say I have two tables, A and B, related in a one-to-many relationship.
A holds demographic info (Names) for each person
B holds transactions for each person.
I want an export that looks like this:
First Name
Last Name
Date
Amount
Alice
Able
1/1/2025
$100
2/1/2025
$50
3/1/2025
$75
Bob
Baker
1/1/2025
$100
Carl
Clarkson
6/1/2025
$99
8/1/2025
$9
I can almost get this if I do a standard XLSX export from FileMaker, by including fields from both tables in the export, and exporting from a found set in Table A:
First Name
Last Name
B::Date
B::Amount
Alice
Able
1/1/2025
$100
2/1/2025
$50
3/1/2025
$75
Bob
Baker
1/1/2025
$100
Carl
Clarkson
6/1/2025
$99
8/1/2025
$9
So close! FileMaker untangles the 1 to Many relationship and includes more than one related record, just like I want.
However, the problem is that all fields from the "B" table get the "B::" prefix (and in reality, the B table name is much longer than just "B", so it's really annoying).
I tried adding calculated fields in the A table which mirror the B table fields, but this doesn't work - you get the first related record only.
I tried adding a List() calculated field in the A table. This almost works, but you end up with multiple values in one Excel cell separated by a carriage return like this:
Create a new layout with the context of the child table. Then it shows all child records. You can sort on the client, then hide all client names after the first one, using a GetNthRecord construct.
Maybe have a look at our fx-reports (GitHub, Docs).
It uses the MBS plugin an LibXL to generate any kind of Excel document. In your case you would need a simple template and you would then provide your data as a json array of arrays. You could also just replace the column header on an existing xlsx.
Maybe a litte bit overkill for the job, but check the examples on GitHub if you like.