
use regex to show info from mutation record
When you activate the mutation history, the complete contents of the mutation record is stored as a json like object. The default details page will show you the old- and new values, but i want to show these values in regular list views.
To do this, i created some additional properties on the _mutation table:
old_value: text expression: mmatch(var:record.mutations, "\"volledige_naam\"\:\"([\s\S]*?)\"\}", 1)
new_value: text expression: mmatch(var:record.mutations, "\"volledige_naam\"\:\"([\s\S]*?)\"\}", 2)
The exact formula depends on the contents that was changed. For us, this was wat we needed. Might be helpful for others.
When you activate the mutation history, the complete contents of the mutation record is stored as a json like object. The default details page will show you the old- and new values, but i want to show these values in regular list views.
To do this, i created some additional properties on the _mutation table:
old_value: text expression: mmatch(var:record.mutations, "\"volledige_naam\"\:\"([\s\S]*?)\"\}", 1)
new_value: text expression: mmatch(var:record.mutations, "\"volledige_naam\"\:\"([\s\S]*?)\"\}", 2)
The exact formula depends on the contents that was changed. For us, this was wat we needed. Might be helpful for others.
Login to reply