Hi Chris, did I get you right that this report is something separate from the forms you were asking about previously? Is your question, basically, about what I've rephrased below?
> When I have several tiddlers that describe families, with fields like spouse.name.1 and spouse.name.2 (may be 1 or 2 fields, similarly there can be any number of fields for children, like child.name.#), how can I show a report, which will say something like:
> famility 1
> parents: John, Mary
> children: Bob, Ann, Cathy
>
famility 2
> ...
If yes, you can do something like
<<fet filter '[tag[family]]'
script '
const getFieldNames = (tiddler) => Object.keys(tiddler.fields)
const getFieldsValues = (tiddler, fieldNames) => fieldNames.map(fieldName => tiddler.fields[fieldName])
function getParents(tiddler) {
const fieldNames = getFieldNames(tiddler)
.filter(fieldName => fieldName.match(/^spouse\.name\.\d+$/))
return getFieldsValues(tiddler, fieldNames)
}
function getChildren(tiddler) {
const fieldNames = getFieldNames(tiddler)
.filter(fieldName => fieldName.match(/^child\.name\.\d+$/))
return getFieldsValues(tiddler, fieldNames)
}'
write 'tiddler.title + "\n" +
"parents: " + getParents(tiddler).join(", ") + "\n" +
"children: " + getChildren(tiddler).join(", ") +
"\n\n"'
>>
(haven't tested this yet, though, let me know if there's any issue)