Skip to content

Commit

Permalink
Fix formatting in column ordering example
Browse files Browse the repository at this point in the history
  • Loading branch information
johngrimes committed Apr 16, 2024
1 parent cb1de86 commit f695d59
Showing 1 changed file with 61 additions and 26 deletions.
87 changes: 61 additions & 26 deletions input/pagecontent/StructureDefinition-ViewDefinition-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -363,42 +363,77 @@ To change the column ordering, it is possible to place the columns or the `union

For example, the `column`s in this ViewDefinition will appear in alphabetical order:

```js
```json
{
"name": "column_order_example",
"resource": "...",
"select": [{
"column": [
{ "path": "'A'", "name": "a" },
{ "path": "'B'", "name": "b" }
]
"select": [{
"forEach": "aNestedStructure",
"column": [
{ "path": "'C'", "name": "c" },
{ "path": "'D'", "name": "d" }
]
}],
"unionAll" : [{
"select": [
{
"column": [
{ "path": "'E1'", "name": "e" },
{ "path": "'F1'", "name": "f" }
{
"path": "'A'",
"name": "a"
},
{
"path": "'B'",
"name": "b"
}
],
"select": [
{
"forEach": "aNestedStructure",
"column": [
{
"path": "'C'",
"name": "c"
},
{
"path": "'D'",
"name": "d"
}
]
}
],
"unionAll": [
{
"column": [
{
"path": "'E1'",
"name": "e"
},
{
"path": "'F1'",
"name": "f"
}
]
},
{
"column": [
{
"path": "'E2'",
"name": "e"
},
{
"path": "'F2'",
"name": "f"
}
]
}
]
},
{
"column": [
{ "path": "'E2'", "name": "e" },
{ "path": "'F2'", "name": "f" }
{
"path": "'G'",
"name": "g"
},
{
"path": "'H'",
"name": "h"
}
]
}
]
},
{
"column": [
{ "path": "'G'", "name": "g" },
{ "path": "'H'", "name": "h" }
]
}]
]
}
```

Expand Down

0 comments on commit f695d59

Please sign in to comment.