Forum Discussion
manthena2020
4 months agoAdvisor
I can see issue is fixed. But my question here is why cant we call this property
def wildvalue = instanceProps.get("wildvalue")
in Collection Script?
- Anonymous4 months ago
Because with batchscript, the script runs for all instances. Which instance's wildvalue did you expect back? You can only do instanceProps.get("wildvalue") on script, not batchscript.
- Anonymous4 months ago
I believe there is a way to grab from the deviceDatasourceProps the list of wildvalues, but i haven't been able to relocate the code where i saw that done.
It would be nice if someone from LM who knew how to do it chimed in here. Maybe someone from the ME team...
- skylaurman4 months agoEmployee
Here is a way to get a list of the wild values:
def listOfWildValues = datasourceinstanceProps.values().collect { it.wildvalue }
Here is a way to do as you wish with the wild values:
datasourceinstanceProps.each { instance, instanceProperties -> instanceProperties.each { it -> def wildValue = it.wildValue // Do something with wild value } }
Related Content
- 11 months ago
- 11 months ago
- 3 months ago
- 8 months ago