How can I access datapoint values within a complex datapoint Groovy script ?
Summary: Steve McGarry, Steve McGarry, is seeking help with a Groovy scripting issue related to accessing datapoint values within a complex datapoint. Steve explains that he is using the Velocloud API module to poll data and needs to perform post-processing based on the "EdgeState" property. He shared the expression he's trying to replicate in Groovy: using the ternary operator to return 2 if "EdgeState" equals 3, otherwise 1. However, he encounters a groovy.lang.MissingPropertyException, indicating that "EdgeState" is not found, and he's unsure how to correctly reference this value in the script. He is looking for guidance from the community.
Hi All,
I've been chasing my tale for a while now trying to resolve the above question - so Im hoping the hive mind can help me out as I'm out of ideas !
I'm using the Velocloud API module that polls a central Orchestrator platform every 5 mins and returns a number of properties for each instance that has been discovered. I need to use a complex datapoint to perform some additional post-processing based on the return value of one of the properties call "EdgeState".
I have an expression that gives me what I require which is:
if(eq(EdgeState,3),2,1)
If the value is 3, return 2 else its a 1.
I'm trying to get the equivalent functionality from within a Groovyscript, by doing the following:
def result = (EdgeState == 3) ? 2 : 1
return result
However I get an error; exception=groovy.lang.MissingPropertyException: No such property: EdgeState
I realise this is telling me that EdgeState has not been found, but I don't know what syntax to use to correctly address the value...
Here is the construct for the datapoint from the module:

Here is a screenshot from one of the instances illustrating the issue (TradingDown is the complex datapoint I am referring to):

Any help will be greatly appreciated
Thanks in advance
Steve McGarry
OP4 months ago · EditedHi all - after following up with TAC on the above, it appears this is not currently possible. To achieve this the collection script would have to be modified directly to export a new datapoint that has already had the post-processing applied. I think I have figured out a work around for my use case which is based on creating multiple complex datapoints & then using expressions to manipulate them and raise the required threshold alerts... I have raised a Feature request asking for datapoints to be made accessible to complex datapoint groovy scripts, so custom post processing can be managed easier whilst minimising the number of complex creations