Forum Discussion
hooleylist
Feb 20, 2012Cirrostratus
Hi FishNiX,
A couple points:
You can retrieve the name and value of a data group entry using -element. This avoids needing to run two class searches to check if the name matches and then get the value.
I haven't read your rule closely enough to know why you're looping through the data group. Ideally, you'd avoid this by using default class command options. If that can't be done, then save the value of the current element and use that to log values. When you log [class nextelement -name $cn $id] you're actually getting the next element instead of logging the current element. If you only have one element in the data group, you'll get the runtime error.
Aaron