Hi all,
What would be the best way to inform the user a couple of parameters are not writable in a certain device state. This state is indicated by a state parameter in the connector. My first idea was to hide the write parameters, but I think that's not possible. Some other ideas:
- Add a fixed parameter under those write parameters with a message explaining this behaviour.
- Display an information message saying it is not possible to perform a set when the user tries to set a value.
- Don't show anything, the value won't be updated anyway.
- Other suggestions
Thanks in advance!
Hello,
To display a message when you click on a write parameter please use the tag Message on the Parameter tag:
If you want to disable a write parameter based on another parameter value, please use the disable option on the discreet tag.
You could also have a QAction linked to that write parameter and validate the value before you set it.
If you trigger a QAction on that, you could then do protocol.ShowInformationMessage(“The value selected is invalid and it won’t be executed!”); to inform the user of the invalid option selected.
It's been a long time, but isn't there something like parameter dependencies, which allow you to maybe trigger a pop-up upon a write-attempt to show the dependency?
Besides the dependencies, you could also use the option attribute on the protocol.params.param.measurement.type tag, where you can define a condition to disable a write parameter based on the value of a different parameter.
The dependencies tag can only be used to check whether other parameters are set (e.g. none of the parameters is “Not Initialized”). In theory this functionality could prevent the user from setting the parameter, but I find the pop-up message “Parameter ‘X’ requires that the following parameters are set first: …” a bit misleading, because no parameter needs to be set by the user, it just depends on the device state.
The option attribute “custom=disableWrite:pid=value” can only be used on table parameters: “With this option you can make a column read-only based on a value of a different column in the same table.”
We need an option for standalone parameters.
Since disabling write control is today not possible for single parameters, why not creating a nice Visual Overview in which you can tweak this to your needs?
It's possible to disable a write parameter when another value has a certain value on a table, I don't know if yours is a single parameter or a column.
Unfortunatly, it are all single parameters.
Hi,
I don’t think a message needs to be displayed every time one of the parameters is changed. It might be better to first check the device state and if necessary a message can be shown if the set won’t be executed.
The disable option won’t work since it are all standalone parameters.
The set is already being validated, my question is more about how to inform the user the set won’t be executed.