Build memory tag to populate a complex prop in perspective (states in multistate button)

Im trying to figure out how to format a memory tag so I can populate a multistate button. A generic multistate button i structured like so

[ { "text": "Hand", "value": 1, "selectedStyle": { "classes": "", "backgroundColor": "#FFF275" }, "unselectedStyle": { "classes": "" } }, { "text": "Off", "value": 2, "selectedStyle": { "classes": "", "backgroundColor": "#F84553" }, "unselectedStyle": { "classes": "" } }, { "text": "Auto", "value": 3, "selectedStyle": { "classes": "", "backgroundColor": "#7CEA9C" }, "unselectedStyle": { "classes": "" } } ]
image

As far as i understand the memory tag has to hold a string array, but I cant seem to figure out how to format the items in the array. I feel like I've tried the most obvious ways already and I've begun plain guessing.

No, the memory tag would have to hold a json-encoded string, and your binding to .states would have to decode the JSON back to an object.

If you use a "Document" data type for the tag, it should "just work" in both directions.

1 Like