<?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: SelectValues() doesn't work with pre built string variable in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/SelectValues-doesn-t-work-with-pre-built-string-variable/m-p/1968691#M17191</link>
    <description>&lt;P&gt;hi, can you console&amp;nbsp;&lt;SPAN&gt;seletionsString &amp;amp; give a example how it comes&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 15 Aug 2022 11:16:00 GMT</pubDate>
    <dc:creator>ajaykakkar93</dc:creator>
    <dc:date>2022-08-15T11:16:00Z</dc:date>
    <item>
      <title>SelectValues() doesn't work with pre built string variable</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/SelectValues-doesn-t-work-with-pre-built-string-variable/m-p/1867272#M15986</link>
      <description>&lt;P&gt;I'm relatively new to Qlik Sense and the world of mashups, but I haven't been able to find any similar questions on the community.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm currently building a mashup and I've created a List, used the callback function to fill a form with checkbox inputs, and added a submit button.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I'm struggling with is getting SelectValues() to work with a string variable that combs the form for selections and puts them in the correct format.&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;$("#form-member-status .submit-button").click(function() {
			let myForm = document.getElementById("form-member-status").querySelectorAll('input[type=checkbox]');
			var selections = [];
			for(var i=0; i&amp;lt;myForm.length; i++) {                    
                    if(myForm[i].checked) {
						selections.push('"' + myForm[i].value + '"');
					} 
            };
			var selectionsString = '[{qText: ' + selections.join("},{qText: ") + '}]';
			app.field("StatusOfMember").selectValues(selectionString, false, false);
		});&lt;/LI-CODE&gt;
&lt;P&gt;For some reason this does not work. However, if I add in alert(seletionsString) and take that value and paste it in so I have the following, this works fine.&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;app.field("StatusOfMember").selectValues([{qText: "Member"},{qText: "Partner"}], false, false);&lt;/LI-CODE&gt;
&lt;P&gt;This shows the rest of the code is working correctly.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help would be much appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Dec 2021 19:59:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/SelectValues-doesn-t-work-with-pre-built-string-variable/m-p/1867272#M15986</guid>
      <dc:creator>DarwinSimon</dc:creator>
      <dc:date>2021-12-06T19:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: SelectValues() doesn't work with pre built string variable</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/SelectValues-doesn-t-work-with-pre-built-string-variable/m-p/1968691#M17191</link>
      <description>&lt;P&gt;hi, can you console&amp;nbsp;&lt;SPAN&gt;seletionsString &amp;amp; give a example how it comes&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2022 11:16:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/SelectValues-doesn-t-work-with-pre-built-string-variable/m-p/1968691#M17191</guid>
      <dc:creator>ajaykakkar93</dc:creator>
      <dc:date>2022-08-15T11:16:00Z</dc:date>
    </item>
  </channel>
</rss>

