Read Widget property from custom module?

Is it possible to read a widget's property and / or value from the custom module?

I'd like to do some checks before committing to an action. For example:

const value = getValueFromWidget("/address") // getValue from widget
value === 1 ? doAction1 : doAction2

Cheers,
DMDComposer

Widget objects are not available in the custom module, you have to use the remote control commands /GET or /EDIT/GET (which will only returns raw properties, not their dynamically computed values). This is a limitation I might address at some point but I haven't made a decision yet.

1 Like