Page 1 of 1

SetVariableDefaultValue allows to set arbitrary values

Posted: 20 Feb 2023, 12:04
by jramirez-jh
When using SetVariableDefaultValue I'm able to save any data type into another one without having any warning or error, for example: saving a string in a bool variable or a string inside an integer variable.

Just wanted to know why is this allowed?

Re: SetVariableDefaultValue allows to set arbitrary values

Posted: 17 May 2023, 08:41
by Support Team
Hello,

The method SetVariableDefaultValue does not do any DataType checks for performance reasons. The method can only be called by the server application and we do not want to cause the overhead on checking the DataType, ValueRank because we expect the server application to call the methods in a correct way.
When a client is writing a value, then the checks are done by the sdk, because we cannot expect that all clients are implemented correctly.