Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Dev Space

Customize and extend the power of Alteryx with SDKs, APIs, custom tools, and more.

Alteryx Widget Not Rendering

alevan
5 - Atom

Hey, all! I'm having trouble getting some widgets to render for a tool I'm building! I moved some code over from a previous tool to a current one, however when the page is rendered I don't get the tool I'm expecting:

 

<label>XMSG("Number of Reasons")</label>
            <ayx data-ui-props = "{type: 'NumericSpinner', widgetId: 'maxCodes'}"
                 data-item-props = "{dataName: 'maxCodes', dataType: 'ConstrainedInt', min: 1, max: 10}"></ayx>
            <div>
                <div>
                    <label>XMSG("Low Threshold")</label>
                        <div>
                            <div>
                            <ayx data-ui-props="{type:'CheckBox'}"
                                data-item-props="{dataName:'enableThresholdLow'}"></ayx>
                            </div>
                            <div>
                            <ayx data-ui-props = "{type: 'NumericSpinner', widgetId: 'thresholdLowSpinner'}"
                                data-item-props = "{dataName: 'thresholdLow', dataType: 'ConstrainedFloat', step: 0.05, allowedPrecision: 3}"></ayx>
                            </div>
                        </div>
                </div>

Have I missed a step? Should these be populated from somewhere?

 

Thanks!

3 REPLIES 3
BlytheE
Alteryx Alumni (Retired)

Hi @alevan, does anything render in the GUI? Have you tried looking at our HTML GUI SDK sample tool? The HtmlGuiSdkGui.html file can be found here - C:\Program Files\Alteryx\bin\HtmlPlugins\HtmlGuiSdk.

alevan
5 - Atom

Right now, yes, all my other widgets are rendering just fine except for these ones. What is the lifecycle for widgets? When in the process do they get rendered, because I'm wondering if I'm asking these to render after the engine has finished looking for widgets to render in the DOM.

BlytheE
Alteryx Alumni (Retired)

Here's some help documentation around the lifecycle methods - https://help.alteryx.com/developer/current/HTML/Use/PluginUI.htm. Let me know if you have any questions after looking through it!