We're displaying parameters in an automation script using UIBlockType.Parameter, which are read/write, is it possible to display them as read-only?
Hey Philip,
This should be possible by using the "IsEnabled" property.
When this is set to false, users won't be able to change the parameter value. The write button will be visible, but it won't be clickable
When in doubt about certain features for IUBlocktype objects, you can always find them on this page.
Hi Philip,
As far as I know this is not supported. The UIBlockType Parameter does not have a property to disable the write parameter.
However, there is a workaround. You could use security levels to avoid displaying the write parameter for a specific user. This implies updating the connector (driver) to override the security level in the write parameter. You can find more information about how to define the security level for specific parameter in the DataMiner Development Library - Protocol.Params.Param
I performed a small test and it is working as expected:
- Restricted user:
- User with access to write the parameter:
Thanks Miguel,
This looks like a good option for other solutions I’ll be looking at. In this case the users still need to be able to set those parameters elsewhere, so won’t work in this instance.
Thanks Maxim,
This works best for my requirements.