Hi,
does anybody know, how to configure default option for RadioGroup/StringSelector in HTML GUI SDK V2? It was pretty easy to do in V1, but I cannot get it to work with V2. There is no such example in sample tool and didn't find anything in documentation as well.
<ayx data-ui-props='{type:"RadioGroup", widgetId:"RG1"}' ></ayx> // Radio Group // ----------- var stringSelector1 = new AlteryxDataItems.StringSelector('RG1', { optionList: [ {label: 'XMSG("Option1")', value: "include"}, {label: 'XMSG("Option2")', value: "exclude"}, ] }) manager.addDataItem(stringSelector1) manager.bindDataItemToWidget(stringSelector1, 'RG1') // Bind to widget
Thanks
Petr
Solved! Go to Solution.
Hi @PetrT,
Adding the following after your code should work:
window.Alteryx.Gui.Manager.getDataItem('RG1').setValue('include');
OR
window.Alteryx.Gui.Manager.getDataItem('RG1').setValue('exclude');
Thanks,
Paul Noirel
Sr Customer Support Engineer, Alteryx