Computed attributes issue: advice needed!

Victor Butler5 years ago

Hi Anton,

Some help with computed attributes will be deeply appreciated, can you advice on the below issue please?

If use this formula according to the documentation: io30 ? io30 : null and io30 is 0, I get null. The attribute therefore is not recorded in positions table when io30 == 0.

To fix the above issue I do this: (io30 || io30 == 0) ? io30 : null. Then, I get WARN message if io30 is not sent by the device:

WARN: Attribute computation error - org.traccar.handler.ComputedAttributesHandler.computeAttribute

Can you advice on what formula to use to fix this issue please? The JEXL Syntax library does not help much.

Thank you in advance!

Anton Tananaev5 years ago

Why are you duplicating threads?

Victor Butler5 years ago

Yes, apologies for that. Wasn't sure if you saw the previous one (or maybe it was too detailed to bother with an answer) so I decided to try my luck again.

So based on your expertise, is there a solution to this problem?

...and I promise not to duplicate threads again :)