Dynamic functions and filters in MyST¶
The MyST forms of the specimens on Dynamic functions and filters, each rendered live by this page’s own Markdown parser. The needs below have ids and a tag of their own, because a need id is unique in the project; the views select the needs of that page, as a view selects needs from the whole project.
Dynamic functions in fields¶
Dynamic functions in fields
```{req} Store the settings
:id: EX_REQ_MYST_DYNAMIC_1
:status: open
:tags: ex-dynamic-myst
:owner: settings team
The settings survive a restart.
```
```{spec} Write the settings file
:id: EX_SPEC_MYST_DYNAMIC_1
:owner: [[copy("owner", "EX_REQ_MYST_DYNAMIC_1")]]
:tags: ex-dynamic-myst
:links: EX_REQ_MYST_DYNAMIC_1
The owner is that of [[copy("id")]], which is not computed here.
```
```{impl} Settings writer
:id: EX_IMPL_MYST_DYNAMIC_1
:status: done
:tags: ex-dynamic-myst
:links: [[links_from_filter("'ex-dynamic-myst' in tags and type == 'spec'")]]
Writes the settings file.
```
The settings survive a restart. |
The owner is that of [[copy(“id”)]], which is not computed here. |
Writes the settings file. |
Filter strings¶
A filter on fields
```{needlist}
:filter: owner == "settings team" and "ex-dynamic" in tags
:sort_by: id
```
A filter on links
```{needtable}
:filter: len(links) > 0 and "ex-dynamic" in tags
:columns: id, title, links
:style: table
```
ID |
Title |
Links |
|---|---|---|
Settings writer |
||
Write the settings file |
Cypher queries¶
A Cypher query
```{needlist}
:cypher: MATCH (n:spec)-[:links]->(r:req) WHERE 'ex-dynamic' IN r.tags RETURN n
:filter: type == "spec" and "EX_REQ_DYNAMIC_1" in links
```