Skip to main content
1-Visitor
July 14, 2022
Solved

Reset thing property value to default value

  • July 14, 2022
  • 2 replies
  • 4608 views

Hi all,

 

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

 

Thanks,

Sujith

Best answer by nmutter

(cannot edit last post for some reason)

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

2 replies

22-Sapphire I
July 14, 2022

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)

1-Visitor
July 15, 2022

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!

22-Sapphire I
July 15, 2022

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

1-Visitor
August 22, 2022

Hi,

 

Anyone else has a solution for this?

Or do I have to raise a case?

 

Thanks,

Sujith