You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A textfield (or even user defined variable) with key foo.bar will be present in submission data as:
{
"foo": {
"bar": "baz"
}
}
When selecting this variable in the options for the JSON dump registration plugin, it will show up as foo.bar. Currently, we iterate over all items in the submitted data, which will contain the key foo as it is a nested structure. Key foo will not be present in the list of variables to include, so it is not added.
Possible solutions in JSONDumpRegistration.register_submission():
Re-implement items() for FormioData to return the flat-key structure instead of the nested one (not sure if this is the general behaviour we want though)
Process the keys in options["variables"] to represent the nested data structure
Iterate over keys in options["variables"] instead of the FormioData.items(), as the lookup in the other direction does work. Probably the easiest, but it goes against the original philosophy of iterating over all available form variables.
A textfield (or even user defined variable) with key
foo.bar
will be present in submission data as:When selecting this variable in the options for the JSON dump registration plugin, it will show up as
foo.bar
. Currently, we iterate over all items in the submitted data, which will contain the keyfoo
as it is a nested structure. Keyfoo
will not be present in the list of variables to include, so it is not added.See also: comment
The text was updated successfully, but these errors were encountered: