Can a device attribute be an array?

I’m thinking of several potential ideas for plugins, where the number of variables returned may vary, or may be impractical to declare individually due to its quantity.

A way to handle these could be for the plugin to return an array, or maybe have the plugin process the data to generate and return a blob that would be ready to send to a screen as is.

What ways are there to handle these applications?

Example of impractical data to generate individual variables: energy consumption of 60+ nodes
Example of unknown data length: list of users logged in on slack (can’t edit the plugin to generate a new attribute every time there is a new user)

Thanks

Yes. Here are a couple examples:

In this demonstration, Movies is an object array.

In the JRiver plugin, SupportedMediaCommands is a string array.

Thanks.
I’ll check those examples in detail

Is gridview the best/only way to publish array data on screen?

GridView or ComboBox. Both support array bindings.

I’ve advanced with this, but my plugin generates an array with format:
{{user:bill,state:active},{user:bob,state:away},...}
When using a gridview I can only have it show one field, either user or state, through the TextMemberPath.
Is there a way to pull and show both fields at the same time and have them shown side by side?
What if there are several fields for each element (like circuit id,current watts,min,max,average, etc) ?

Thanks

Maybe you can generate a new array based off that & add a new field to called “description”, or something like that. Then populate this “description” field with both of those values. You can only display 1 property in the GridView.

Yes, all the fields/columns could be merged into one, but that limits the possibilities.
Maybe eventually we can have an “array browser” where a template can be defined for each element of the array, and that template can access individual fields of each element and bind them to text boxes?

Thanks

Perhaps. Or maybe an ItemTemplate property could be added to the GridView itself, allowing you to access every item field just like a device template.

That would be fabulous!
Hope you consider it for a future release.
Thanks!