Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

Exclusion Groups: selecting buttons with JavaScript


Former Community Member


How do I manipulate an Exclusion Group selection using JavaScript?

I created this four option Exclusion Group called REASON and used this line of code to select the first option:

     xfa.resolveNode("#subform.REASON.#field").rawValue = 1;

And it works just fine. So I took for granted this line sets field 1 as the selected button. Or so I thought.

Then I tried this:

     xfa.resolveNode("#subform.REASON.#field").rawValue = 2;

Hoping this would select the SECOND button in the group. Well, it doesn't work, no button is selected.

What am I missing??

Thank you for any hints!


1 Accepted Solution


Correct answer by
Level 10
2 Replies


Correct answer by
Level 10

Use this syntax: