I would like to use JavaScript resource to disable a container - the intention is to run this script on the Success of an execution query. I tried containerName.disabled = true but this is not working.
Hi Daniel! You wouldn’t be able to directly assign values to the objects inside of the data model like this since the JS is run in a sandbox. There are specific JS methods that can make specific changes, like textinput1.setValue(“hello”), but the container doesn’t support a method for directly changing the disabled setting.
Most settings don’t have a direct JS method, but for anything that accepts a custom input (rather than a dropdown or toggle) you can create a new temporary state, and then use tempState.setValue(true) in your JS query. Then in the container’s Disable this container setting you can reference {{tempState.value}}.