VMware Cloud Community
ImranMughal01
Enthusiast
Enthusiast
Jump to solution

configuration attribute replacing contents of configuration attribute

Hi,

I've got an attribute which is an array/composite type (2 strings)

pastedImage_1.png

I want to remove each value from the composite array and replace with new values. When i remove the values with x.setAttributeWithKey("QMapping",null); the value gets unset like above and i can not push into it again with .setAttributeWithKey("QMapping",attributeValues); as it gives me an error. Is there a way to set the value to null in code like you do when you click on the not set and then click accept, it then initialises the array it seems and lets me add values to it.

pastedImage_2.png

Thanks

0 Kudos
1 Solution

Accepted Solutions
iiliev
VMware Employee
VMware Employee
Jump to solution

Hi,

x.setAttributeWithKey("QMapping", []);

View solution in original post

2 Replies
iiliev
VMware Employee
VMware Employee
Jump to solution

Hi,

x.setAttributeWithKey("QMapping", []);

ImranMughal01
Enthusiast
Enthusiast
Jump to solution

Simple when you know how!

As ever thanks Ilian!

0 Kudos