Skip to main content
1-Visitor
Jul 14, 2022 11:12 AM UTC
Solved

Reset thing property value to default value

Hi all,

 

I want to reset all the properties of a thing to respective default values, how can this be done?

 

Thanks,

Sujith

nmutterAnswer
17-Peridot
Sep 3, 2022 10:34 AM UTC

(cannot edit last post for some reason)

Or just GetMetadata or via GetPropertyValues (also has default value)

12 replies

22-Sapphire I
Jul 14, 2022 3:41 PM UTC

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)

Translate
1-Visitor
Jul 15, 2022 6:46 AM UTC

Hello,

 

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

 

Thank you!

Translate
22-Sapphire I
Jul 15, 2022 6:05 PM UTC

unfortunately if setting to null or undefined doesn't work, then I don't know either.

Translate
1-Visitor
Aug 22, 2022 10:17 AM UTC

Hi,

 

Anyone else has a solution for this?

Or do I have to raise a case?

 

Thanks,

Sujith

Translate