I want to reset all the properties of a thing to respective default values, how can this be done?
Solved! Go to Solution.
With a service, you would have to pull the Property definitions and then find the 'default value' aspect.
Then assign that to the property value
I imagine you don't want to delete and recreate the Thing(s)
how can one set a property of type "number" back to nothing (so that "set value" will be displayed)? I tried setting it to null and undefined but that didn't work. The workaround was to set it to 0, but that is not optimal for what I'm trying to achieve
Hi @PaiChung ,
How do I fetch the Property Definitions with Default value aspect, because the service GetPropertyDefinitions gives me only these fields:
Maybe you cut off some of the columns, isn't there an 'aspects' column? That would hold the information in regards to default value I believe.
I just went back to check and indeed ... it seems a whole lot of information is no longer supplied by GetPropertyDefinition
Not too sure what service to use anymore, I apologize.
@SB_9732186 service GetMetadataAsJSON will also return the default value - if a default value was specified in the property definition.
But I also have no idea on how to reset the property to "nothing".