[SOLVED] Assigning Variable Units from Photon / removing all data

Hey Is there a way to assign a variable unit from a photon device?
I know that ubidots.add() supports var names and context.
but i wonder if there is a function to change/set the variable units from the photon?

Also is there a way to remove old data form a variable (in the data dashboard) without deleting the whole variable?
I’m doing some lab testing and getting lots of false data which I want to remove later when I start the real user testing. The problem is each time I delete variables to reset the values I need to setup the units for those variables, which is bit tedious process. so I’m looking for a way to assign variable units from the photon code or a way to remove old data without removing the whole variable.

thanks!

Hello yuri you can’t do it from photon, but inside ubidots you can do that. Change the units, data source name. But remember never change the data source tag!

To remove old data of a variable without removing variable you can found that in our documentation, it is possible via front end of ubidots

Hey @Metavix,
thanks for the quick reply.
Just found the " Delete Values / Data " button inside the “Cogwheel” menu on the variable page.
attaching screenshot for future reference.

many thanks!

1 Like

No problem you are welcome