I have sensor data coming in and multiple values come into one field. I have been able to create a dictionary in the Arcade expression in Pro and it will calculate successfully. In Velocity, this same Arcade expression will not work when using the calculate field tool. Is there a different function I should be using in Velocity?
Expression validates and calculates in Pro:
In Velocity, it will throw a Missing Parameter or Illegal JSON error:
Solved! Go to Solution.
Have you supplied a suitable sample value for last_values, e.g. '{"field1":{"value":1}}'?
@ArmstKP Thanks for making this post, I would agree with @brudo 's first question. For a "string/text" type field in Velocity, the Arcade default sample value to be evaluated is the string "Pacific" which would not pass your expression and return your desired data type.
The sample values (your JSON in the field) must be provided on the right side for the corresponding field. If you have done this and are still encountering issues, please reach out here or log a support case. Thanks!
Have you supplied a suitable sample value for last_values, e.g. '{"field1":{"value":1}}'?
@brudo @PeterNasuti Thank you both, I didn't supply the sample from that field. I did so and then it worked.
Thank you both!
@ArmstKP Thanks for making this post, I would agree with @brudo 's first question. For a "string/text" type field in Velocity, the Arcade default sample value to be evaluated is the string "Pacific" which would not pass your expression and return your desired data type.
The sample values (your JSON in the field) must be provided on the right side for the corresponding field. If you have done this and are still encountering issues, please reach out here or log a support case. Thanks!