data attribute not persisting
Thursday, April 9, 2020 at 01:53pmI'm trying to save some metadata in the `data` attribute of approvals, or even within a `Field`, but when I GET the package, `data` is `None`. I've had no issues saving metadata within `Documents.data`. Not sure whether this is a bug, or saving information in `data` is not allowed within a `Approval`.
example of what our json looks like when posting a document:
{
'name': title,
'index': index,
'approvals': [
{
'role': '0',
'data': {
'my_data_attribute_0': 123
},
'fields': [{
'page': 0,
'type': 'SIGNATURE',
'top': 0,
'height': 25,
'left': 0,
'width': 200,
'subtype': 'FULLNAME',
'data': {
'my_data_attribute_1': 456
},
}],
}
],
'data': {
'my_data_attribute_2': 789
}
}
`my_data_attribute_0` and `my_data_attribute_1` do not persist, `my_data_attribute_2` is available when getting the package at a later point.
Thank you for your help,
Seb
Reply to: data attribute not persisting
Thursday, April 9, 2020 at 02:18pmHi Seb,
Thanks for your post! In current implementation, only the "data" node at package level (guide here), document level (guide here) and role level allows to input values. In your case, data_attribute_2 is at document level. The "data" nodes at lower levels like approval or field are now just placeholders and always be null. Given this background, you may have to give a more fine-grained naming convention to reference different signature/fields.
Duo
Reply to: Hi Seb, Thanks for your…
Thursday, April 9, 2020 at 02:25pmThanks for your quick response Duo