Level 1
Level 2
Sign in to Community
Learn more
Sign in to view all badges
Expand my Community achievements bar.
This conversation has been locked due to inactivity. Please create a new post.
How can I update multi valued property using groovy, ex: cq:rolloutConfig is of String[] and i want to add values to this field using groovy.
Solved! Go to Solution.
Hi @Shaheena_Sheikh,
In groovy you can use code like this:
Property property = node.getProperty("cq:rolloutConfig") if (property?.isMultiple()) { String [] values = property?.getValues() as String [] if(values) { values += "new value" node?.setProperty("cq:rolloutConfig", values) save() } }
View solution in original post
Views
Likes
Replies
Like