<?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>question Re: Question on service catalog variables - checkbox and list collector in Training and Certifications forum</title>
    <link>https://www.servicenow.com/community/training-and-certifications/question-on-service-catalog-variables-checkbox-and-list/m-p/350732#M8875</link>
    <description>&lt;P&gt;Yes, list collector. But, &lt;SPAN class="ng-scope"&gt;how do we get the values that user selected on the list collector and then map it to the table that we have containing the list of&amp;nbsp;Approvers? Is this possible through scripting? Once we know who the required approvers are, the workflow should generate Approval requests for each selected value in the list collector.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jun 2018 09:47:45 GMT</pubDate>
    <dc:creator>karrierr</dc:creator>
    <dc:date>2018-06-27T09:47:45Z</dc:date>
    <item>
      <title>Question on service catalog variables - checkbox and list collector</title>
      <link>https://www.servicenow.com/community/training-and-certifications/question-on-service-catalog-variables-checkbox-and-list/m-p/350730#M8873</link>
      <description>&lt;P&gt;We need to add a new variable in one of our service catalog items that will allow user to select multiple values in the choices. Aside from that, depending on the selected values, the system should determine the right Approver and generate an approval request to that person.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I believe that we can use a check box or list collector. However, if we use a check box, is there a way to not hard-code each value (because the values are around 50)?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If we use a list collector, we can have a table-driven value displayed on it, but how do we get the values that user selected on the list collector and then map it to the table that we have containing the list of&amp;nbsp;Approvers? Is this possible through scripting? Once we know who the required approvers are, the workflow should generate Approval requests for each selected value in the list collector.&lt;/P&gt;
&lt;P&gt;Let me know if you have a similar requirement and kindly provide suggestions.&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 09:35:14 GMT</pubDate>
      <guid>https://www.servicenow.com/community/training-and-certifications/question-on-service-catalog-variables-checkbox-and-list/m-p/350730#M8873</guid>
      <dc:creator>karrierr</dc:creator>
      <dc:date>2018-06-27T09:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: Question on service catalog variables - checkbox and list collector</title>
      <link>https://www.servicenow.com/community/training-and-certifications/question-on-service-catalog-variables-checkbox-and-list/m-p/350731#M8874</link>
      <description>&lt;P&gt;As you have good number of choices to deal with with, it is suggested to go with "list collector WITH reference as table"(the table that holds those 50 values).&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;&lt;STRONG&gt;Saikiran Guduri (NOW)&lt;/STRONG&gt;&lt;BR /&gt;Associate Certificate Engineer | ServiceNow Store Apps&lt;BR /&gt;(Please mark the answer as &lt;STRONG&gt;correct answer/helpful/accept the solution&lt;/STRONG&gt; if it helps)&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 09:41:04 GMT</pubDate>
      <guid>https://www.servicenow.com/community/training-and-certifications/question-on-service-catalog-variables-checkbox-and-list/m-p/350731#M8874</guid>
      <dc:creator>Saikiran Gudur1</dc:creator>
      <dc:date>2018-06-27T09:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: Question on service catalog variables - checkbox and list collector</title>
      <link>https://www.servicenow.com/community/training-and-certifications/question-on-service-catalog-variables-checkbox-and-list/m-p/350732#M8875</link>
      <description>&lt;P&gt;Yes, list collector. But, &lt;SPAN class="ng-scope"&gt;how do we get the values that user selected on the list collector and then map it to the table that we have containing the list of&amp;nbsp;Approvers? Is this possible through scripting? Once we know who the required approvers are, the workflow should generate Approval requests for each selected value in the list collector.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 09:47:45 GMT</pubDate>
      <guid>https://www.servicenow.com/community/training-and-certifications/question-on-service-catalog-variables-checkbox-and-list/m-p/350732#M8875</guid>
      <dc:creator>karrierr</dc:creator>
      <dc:date>2018-06-27T09:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Question on service catalog variables - checkbox and list collector</title>
      <link>https://www.servicenow.com/community/training-and-certifications/question-on-service-catalog-variables-checkbox-and-list/m-p/350733#M8876</link>
      <description>&lt;P&gt;Hi karrie,&lt;/P&gt;
&lt;P&gt;From your requirement, the best thing for multiple selection is to use List collector,&lt;/P&gt;
&lt;P&gt;To get the selected values of list collector use current.variable_pool.VARIABLE_NAME.getDisplayValue();&lt;/P&gt;
&lt;P&gt;and try to write script as follows for approvals in approval activity.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;answer =[];&lt;/P&gt;
&lt;P&gt;var model = current.variable_pool.model.getDisplayValue();&lt;BR /&gt;var get_model = model.split(',');&lt;/P&gt;
&lt;P&gt;for(i=0; i&amp;lt;get_model.length; i++){&lt;BR /&gt; &lt;BR /&gt; if(get_model[i].trim()=='ABC' || get_model[i].trim()=='XYZ' ) {&lt;BR /&gt; &lt;BR /&gt; answer.push('user1');&lt;BR /&gt; answer.push('user2');&lt;BR /&gt; continue;&lt;BR /&gt; &lt;BR /&gt; }&lt;/P&gt;
&lt;P&gt;if(get_model[i].trim()=='PQR'){&lt;BR /&gt; answer.push('user3');&lt;BR /&gt; continue;&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; }&lt;BR /&gt; &lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Tripti S&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 09:51:10 GMT</pubDate>
      <guid>https://www.servicenow.com/community/training-and-certifications/question-on-service-catalog-variables-checkbox-and-list/m-p/350733#M8876</guid>
      <dc:creator>Trupti6</dc:creator>
      <dc:date>2018-06-27T09:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: Question on service catalog variables - checkbox and list collector</title>
      <link>https://www.servicenow.com/community/training-and-certifications/question-on-service-catalog-variables-checkbox-and-list/m-p/350734#M8877</link>
      <description>&lt;P style="text-align: justify;"&gt;Hi Tripti,&lt;/P&gt;
&lt;P style="text-align: justify;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="text-align: justify;"&gt;Thanks for your response.&lt;/P&gt;
&lt;P style="text-align: justify;"&gt;Based on the sample script you sent, does that mean I should hard-code the values and approvers in the script in order to generate the approval requests?&lt;/P&gt;
&lt;P style="text-align: justify;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="text-align: justify;"&gt;Regards,&lt;/P&gt;
&lt;P style="text-align: justify;"&gt;Karrie&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 11:40:12 GMT</pubDate>
      <guid>https://www.servicenow.com/community/training-and-certifications/question-on-service-catalog-variables-checkbox-and-list/m-p/350734#M8877</guid>
      <dc:creator>karrierr</dc:creator>
      <dc:date>2018-06-27T11:40:12Z</dc:date>
    </item>
    <item>
      <title>Re: Question on service catalog variables - checkbox and list collector</title>
      <link>https://www.servicenow.com/community/training-and-certifications/question-on-service-catalog-variables-checkbox-and-list/m-p/350735#M8878</link>
      <description>&lt;P&gt;Yea karrie,&lt;/P&gt;
&lt;P&gt;If you are able to add dynamic values of users you can add,&lt;/P&gt;
&lt;P&gt;By using&amp;nbsp; glideRecord fetch the users and add&amp;nbsp;users to array using answer.push();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is sample code:&lt;/P&gt;
&lt;P&gt;var answer = [];&lt;BR /&gt; var member = new GlideRecord('Table NAme');&lt;BR /&gt; member.addQuery('u_user.name',"ABC");// add your code here as required&lt;BR /&gt; member.query();&amp;nbsp;&lt;BR /&gt; while (member.next()) {&lt;BR /&gt; answer.push(member.getValue('u_user'));&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Tripti S.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.dxsherpa.com/" rel="nofollow"&gt;www.dxsherpa.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jun 2018 05:33:28 GMT</pubDate>
      <guid>https://www.servicenow.com/community/training-and-certifications/question-on-service-catalog-variables-checkbox-and-list/m-p/350735#M8878</guid>
      <dc:creator>Trupti6</dc:creator>
      <dc:date>2018-06-28T05:33:28Z</dc:date>
    </item>
  </channel>
</rss>

