12-20-2018 08:02 AM
Hi,
I just noticed some strange behavior on tag properties.
I have a tag defined with multiple properties (all properties are written during tag initialisation).
Now when I try to update a single property the other is removed from the tag definition.
Example:
After this code the tag has 2 properties.
After updating just this property, <tag> is removed from the property list.
I think it should just update the property I write and it should have a different method in case I want to delete a property.
12-26-2018 10:57 AM
Hey Andre,
Thank you for the feedback.
For any others who see this post, the way to add a property to the existing properties would be to read the properties, and add a new element to the array.
If you wanted to update a property, I would recommend using the in-place element structure to read, replace, and then re-write the array of properties.
01-05-2019 08:33 AM
Hi Brandon,
Thanks for the example.
However the proposed solution looks nice and efficient it adds an extra webservice call to retrieve the properties from the server before they can be written again.
This adds significant lag to to code execution, which on e.g. mobile connections (which are most of our intended targets) would make updating several tag (10+) pretty slow.
I would like to be able to update properties/keys the same way as multiple tag values can be sent in a single web service call. Or maybe even update properties/keys in the same call as values. Reducing the number of messages is important as I have noticed when I started optimizing the performance of one of my dashboards.