Allow common reference macros to be defined in the data sync files
Currently, to add a referenced value to a row, the macro needs to be defined in EVERY row. This has worked well till now, but it can definitely be enhanced.
I would like to add a new data sync row object property called refs
that defines a column name and the macro that should be applied to it automatically. That way, the macro can be executed once and the value used in all rows for this data sync object.
Such as:
[
{
"table": "test_type",
"rows": [
{
"name": "test1",
"label": "Test #1",
"seq": 1,
"enabled": true
}
]
},
{
"table": "test",
"refs": {
"test_type_id": "::test_type(id):name=test1"
},
"rows": [
{
"note": "Test Number 1",
"date_completed": null,
"completed": false
},
{
"note": "Test Number 2",
"date_completed": null,
"completed": false
},
{
"note": "Test Number 3",
"date_completed": null,
"completed": false
}
]
}
]