- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ok, I think I understand where you want to get to. If all vm's have the custom field key not not the value, then you need to skip those without a defined value. Then in the @$cv_ref loop use something like this:
for ( @$cv_ref ) {
next unless defined $_->value;
...
}
But I just checked and all the vm's here have the key and only one has a test value, and my original code works, so in fact skipping the empty values is in my case indifferent. Apparently adding a customfield to one vm adds it to all vm's, just does not fill the value field.
2nd edit: I tried with a global customfield and same thing, it keeps working.