<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Update Select Tool with HTML SDK in Dev Space</title>
    <link>https://community.alteryx.com/t5/Dev-Space/Update-Select-Tool-with-HTML-SDK/m-p/430318#M937</link>
    <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/33285"&gt;@natej&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So for the next step, you need to compare the behaviour of the ListBox widget in HTML and the List Box tool. To do so, first enable "Display XML in Properties Window" from menu Options, User Settings, Edit User Settings, tab Advanced.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let's give a look at how both store their configuration.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Macro with HTML GUI (ListBox widget):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlteryxGui_2019-06-22_00-20-50.png" style="width: 999px;"&gt;&lt;img src="https://community.alteryx.com/t5/image/serverpage/image-id/67006iBEDFAF9017FD3650/image-size/large?v=v2&amp;amp;px=999" role="button" title="AlteryxGui_2019-06-22_00-20-50.png" alt="AlteryxGui_2019-06-22_00-20-50.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Original Macro (List Box tool):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlteryxGui_2019-06-22_00-21-01.png" style="width: 999px;"&gt;&lt;img src="https://community.alteryx.com/t5/image/serverpage/image-id/67007iB3AB49851A6D2924/image-size/large?v=v2&amp;amp;px=999" role="button" title="AlteryxGui_2019-06-22_00-21-01.png" alt="AlteryxGui_2019-06-22_00-21-01.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As you can see:&lt;/P&gt;
&lt;P&gt;- ListBox widget stores a list of selected items&lt;/P&gt;
&lt;P&gt;- By default, List Box tool stores a list of pairs (item=selection status)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We need to update the macro so both configurations are identical.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To do so, you are interested in attribute "Generate Custom List" from List Box tool which, as mentioned in help (&lt;A target="_blank" rel="noopener"&gt;file:///D:/Program%20Files/Alteryx/bin/RuntimeData/HtmlAssets/help.alteryx.com/AlteryxCurrent/en/ListBox.htm&lt;/A&gt;)&amp;nbsp;&lt;EM&gt;&lt;SPAN&gt;generate a list of the selected values.&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;We need a list that contains only items separated by a comma (so no start or end text)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that, if you were to run your macro now, you would notice that it doesn't work anymore. This is because we need to update the action attached to the List Box tool accordingly. As format is now different, we are going to&amp;nbsp;select&amp;nbsp;&lt;EM&gt;Update Raw XML with Formula&lt;/EM&gt; to change parameter &lt;EM&gt;SelectFields&lt;/EM&gt; of the Select tool.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We will use following piece of code to build dynamically the code of the select tool:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;'  &amp;lt;SelectFields&amp;gt;
    &amp;lt;SelectField field="' + replace(EscapeXMLMetacharacters([#1]), ",", '" selected="True" /&amp;gt;
    &amp;lt;SelectField field="') + '" selected="True" /&amp;gt;
    &amp;lt;SelectField field="*Unknown" selected="False" /&amp;gt;
  &amp;lt;/SelectFields&amp;gt;'&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To sum up:&lt;/P&gt;
&lt;P&gt;- dataName and List Box name are the same&lt;/P&gt;
&lt;P&gt;- List Box tool and ListBox HTML widget both produce a list of selected items separated by commas&lt;/P&gt;
&lt;P&gt;- previous list of items is used to dynamically build the XML code of the select tool&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please find the example attached to this post.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PaulN&lt;/P&gt;</description>
    <pubDate>Sat, 22 Jun 2019 09:09:50 GMT</pubDate>
    <dc:creator>PaulN</dc:creator>
    <dc:date>2019-06-22T09:09:50Z</dc:date>
    <item>
      <title>Update Select Tool with HTML SDK</title>
      <link>https://community.alteryx.com/t5/Dev-Space/Update-Select-Tool-with-HTML-SDK/m-p/429466#M934</link>
      <description>&lt;P&gt;I'm trying to learn how to use the HTML SDK (without much HTML/Javascript experience), and picked what seemed like an easy enough task--update a Select Tool.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My GUI has a ListBox widget to select columns, and my engine is a macro with a ListBox interface tool, with the Action tool set to "Update Select with multi-select ListBox". I included a data-item-props, and the fields from my data are populating in the interface, but when I run the workflow I get the error "The configuration is not valid: missing ControlParams field mapping." (see attached file. I couldn't get the yxi to attach so it's a zip that can be changed to yxi)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any thoughts on what I'm doing wrong/how I should be thinking about this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Nate&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2019 17:28:50 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Dev-Space/Update-Select-Tool-with-HTML-SDK/m-p/429466#M934</guid>
      <dc:creator>natej</dc:creator>
      <dc:date>2019-06-20T17:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: Update Select Tool with HTML SDK</title>
      <link>https://community.alteryx.com/t5/Dev-Space/Update-Select-Tool-with-HTML-SDK/m-p/429858#M935</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/33285"&gt;@natej&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for posting&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From personal experience, it is important to ensure that your macro works without the HTML GUI first.&lt;/P&gt;
&lt;P&gt;The message about "ControlParams field mapping" means that you are trying to use a batch macro that does not contain a Control Parameter. Changing your macro to "Standard Macro" will remove this error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Back to HTML SDK, at the moment your ListBox widget is not attached to a List Box tool in the macro. Attribute dataName ("Selected" in your example) should match the List Box name ("List Box (8)" in the macro).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PaulN&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2019 11:13:03 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Dev-Space/Update-Select-Tool-with-HTML-SDK/m-p/429858#M935</guid>
      <dc:creator>PaulN</dc:creator>
      <dc:date>2019-06-21T11:13:03Z</dc:date>
    </item>
    <item>
      <title>Re: Update Select Tool with HTML SDK</title>
      <link>https://community.alteryx.com/t5/Dev-Space/Update-Select-Tool-with-HTML-SDK/m-p/430042#M936</link>
      <description>&lt;P&gt;&lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/7598"&gt;@PaulN&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks for the quick response, I appreciate the pointers.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;So I've updated my macro to be a standard macro rather than batch, and the List Box name is now named "Selected" to match the name of my data. My data now passes through the tool without an error, but the columns output are not affected by the selections in my List Box widget (ie the Select Tool in my macro is not updating). When I test the macro with an Alteryx ListBox Interface tool instead of the HTML widget it works fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What else am I missing?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Nate&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2019 15:04:43 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Dev-Space/Update-Select-Tool-with-HTML-SDK/m-p/430042#M936</guid>
      <dc:creator>natej</dc:creator>
      <dc:date>2019-06-21T15:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: Update Select Tool with HTML SDK</title>
      <link>https://community.alteryx.com/t5/Dev-Space/Update-Select-Tool-with-HTML-SDK/m-p/430318#M937</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/33285"&gt;@natej&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So for the next step, you need to compare the behaviour of the ListBox widget in HTML and the List Box tool. To do so, first enable "Display XML in Properties Window" from menu Options, User Settings, Edit User Settings, tab Advanced.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let's give a look at how both store their configuration.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Macro with HTML GUI (ListBox widget):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlteryxGui_2019-06-22_00-20-50.png" style="width: 999px;"&gt;&lt;img src="https://community.alteryx.com/t5/image/serverpage/image-id/67006iBEDFAF9017FD3650/image-size/large?v=v2&amp;amp;px=999" role="button" title="AlteryxGui_2019-06-22_00-20-50.png" alt="AlteryxGui_2019-06-22_00-20-50.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Original Macro (List Box tool):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlteryxGui_2019-06-22_00-21-01.png" style="width: 999px;"&gt;&lt;img src="https://community.alteryx.com/t5/image/serverpage/image-id/67007iB3AB49851A6D2924/image-size/large?v=v2&amp;amp;px=999" role="button" title="AlteryxGui_2019-06-22_00-21-01.png" alt="AlteryxGui_2019-06-22_00-21-01.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As you can see:&lt;/P&gt;
&lt;P&gt;- ListBox widget stores a list of selected items&lt;/P&gt;
&lt;P&gt;- By default, List Box tool stores a list of pairs (item=selection status)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We need to update the macro so both configurations are identical.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To do so, you are interested in attribute "Generate Custom List" from List Box tool which, as mentioned in help (&lt;A target="_blank" rel="noopener"&gt;file:///D:/Program%20Files/Alteryx/bin/RuntimeData/HtmlAssets/help.alteryx.com/AlteryxCurrent/en/ListBox.htm&lt;/A&gt;)&amp;nbsp;&lt;EM&gt;&lt;SPAN&gt;generate a list of the selected values.&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;We need a list that contains only items separated by a comma (so no start or end text)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that, if you were to run your macro now, you would notice that it doesn't work anymore. This is because we need to update the action attached to the List Box tool accordingly. As format is now different, we are going to&amp;nbsp;select&amp;nbsp;&lt;EM&gt;Update Raw XML with Formula&lt;/EM&gt; to change parameter &lt;EM&gt;SelectFields&lt;/EM&gt; of the Select tool.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We will use following piece of code to build dynamically the code of the select tool:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;'  &amp;lt;SelectFields&amp;gt;
    &amp;lt;SelectField field="' + replace(EscapeXMLMetacharacters([#1]), ",", '" selected="True" /&amp;gt;
    &amp;lt;SelectField field="') + '" selected="True" /&amp;gt;
    &amp;lt;SelectField field="*Unknown" selected="False" /&amp;gt;
  &amp;lt;/SelectFields&amp;gt;'&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To sum up:&lt;/P&gt;
&lt;P&gt;- dataName and List Box name are the same&lt;/P&gt;
&lt;P&gt;- List Box tool and ListBox HTML widget both produce a list of selected items separated by commas&lt;/P&gt;
&lt;P&gt;- previous list of items is used to dynamically build the XML code of the select tool&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please find the example attached to this post.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PaulN&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jun 2019 09:09:50 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Dev-Space/Update-Select-Tool-with-HTML-SDK/m-p/430318#M937</guid>
      <dc:creator>PaulN</dc:creator>
      <dc:date>2019-06-22T09:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: Update Select Tool with HTML SDK</title>
      <link>https://community.alteryx.com/t5/Dev-Space/Update-Select-Tool-with-HTML-SDK/m-p/430740#M939</link>
      <description>&lt;P&gt;Much appreciated&amp;nbsp;&lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/7598"&gt;@PaulN&lt;/a&gt;. Very helpful explanation, I'm feeling like I have a lot better of a handle on the HTML SDK now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Nate&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2019 14:02:26 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Dev-Space/Update-Select-Tool-with-HTML-SDK/m-p/430740#M939</guid>
      <dc:creator>natej</dc:creator>
      <dc:date>2019-06-24T14:02:26Z</dc:date>
    </item>
  </channel>
</rss>

