Result can hold a metadata dictionary alongside its answers. Use it for collection details, study tags, or navigation history associated with that interview.
This API is introduced in PR #2577. The examples require an EDSL version containing the change. Per-result metadata is separate from a remote object’s description, visibility, and other sharing metadata.
Create a result with metadata
This example constructs a result locally without making model calls:None, lists, and nested dictionaries with string keys. Convert dates to strings and other custom objects to JSON-compatible values before attaching them. Sets, tuples, non-string dictionary keys, and non-finite floats are rejected with TypeError during construction.
Select metadata alongside answers
Top-level metadata keys become columns undermetadata.*:
metadata.collection, then read value["wave"]; this API does not flatten every nested key into its own column.
Save and restore
Metadata survives dictionary serialization and.ep package round trips:
Preserve a local session’s navigation history
SurveySession exposes active answers and audit metadata separately. Starting from the survey above, explicitly combine them in a Result:
humanize_navigation contains events and inactive_answers. Events record answer revisions and navigation actions; inactive answers retain values removed when a revised answer invalidates the later path. Only active answers appear in session_result.answer. History includes the recorded answer values, so it can retain answers that are no longer active.
This attachment is explicit in the local API. The PR does not by itself establish that hosted Humanize responses automatically populate navigation metadata. See Back navigation for boundaries, branching, and session behavior.