Stream: shorthand
Topic: Aggregation type
Ole Hedegaard (Aug 19 2021 at 08:53):
Hi. Has anyone worked with multiple aggregation types in .fsh files? I'm having trouble using more than one aggregation type per field, and I don't find this described in the language reference. Syntax like this works just fine:
-
author ^type.aggregation = #referenced
or -
author ^type.aggregation = #bundled
But what if I want both #referenced and "bundled? I've tried usual "or", "|", "," etc. but haven't had any luck. Any suggestions?
Chris Moesel (Aug 19 2021 at 12:18):
Hi @Ole Hedegaard. ElementDefinition.type.aggregation
is an array (0..*
), so you need to use numerical indices or soft indices when assigning more than one item to it.
For example:
* author ^type.aggregation[0] = #referenced
* author ^type.aggregation[1] = #bundled
or
* author ^type.aggregation[+] = #referenced
* author ^type.aggregation[+] = #bundled
Ole Hedegaard (Aug 19 2021 at 12:49):
Works beautifully - thnx!
Last updated: Apr 12 2022 at 19:14 UTC