<?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: Dependent variable: Variable is dependent on number of users in list collector variable in Community Central forum</title>
    <link>https://www.servicenow.com/community/community-central-forum/dependent-variable-variable-is-dependent-on-number-of-users-in/m-p/3401060#M5027</link>
    <description>&lt;P&gt;Use an onChange Catalog Client Script similar to this:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;function onChange(control, oldValue, newValue, isLoading) {
    var usrArr = newValue.split(',');
    if (usrArr.length &amp;gt; 4) {
        g_form.setDisplay('v_attachment', true); //attachment variable name
    } else {
        g_form.setDisplay('v_attachment', false);
&lt;/LI-CODE&gt;
&lt;P&gt;This should also cover hiding the variable when the form loads, but if not create a similar onLoad Catalog Client Script, replacing newValue with g_form.getValue('user_list').split(',') where 'user_list' is the name of your list collector variable.&lt;/P&gt;</description>
    <pubDate>Wed, 08 Oct 2025 15:50:40 GMT</pubDate>
    <dc:creator>Brad Bowman</dc:creator>
    <dc:date>2025-10-08T15:50:40Z</dc:date>
    <item>
      <title>Dependent variable: Variable is dependent on number of users in list collector variable</title>
      <link>https://www.servicenow.com/community/community-central-forum/dependent-variable-variable-is-dependent-on-number-of-users-in/m-p/3400602#M5020</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a list collector variable and an attachment variable. The attachment variable should only be visible and mandatory if the number of users in the list collector is more than 5.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Oct 2025 08:27:39 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/dependent-variable-variable-is-dependent-on-number-of-users-in/m-p/3400602#M5020</guid>
      <dc:creator>ChristineH85739</dc:creator>
      <dc:date>2025-10-08T08:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Dependent variable: Variable is dependent on number of users in list collector variable</title>
      <link>https://www.servicenow.com/community/community-central-forum/dependent-variable-variable-is-dependent-on-number-of-users-in/m-p/3401060#M5027</link>
      <description>&lt;P&gt;Use an onChange Catalog Client Script similar to this:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;function onChange(control, oldValue, newValue, isLoading) {
    var usrArr = newValue.split(',');
    if (usrArr.length &amp;gt; 4) {
        g_form.setDisplay('v_attachment', true); //attachment variable name
    } else {
        g_form.setDisplay('v_attachment', false);
&lt;/LI-CODE&gt;
&lt;P&gt;This should also cover hiding the variable when the form loads, but if not create a similar onLoad Catalog Client Script, replacing newValue with g_form.getValue('user_list').split(',') where 'user_list' is the name of your list collector variable.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Oct 2025 15:50:40 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/dependent-variable-variable-is-dependent-on-number-of-users-in/m-p/3401060#M5027</guid>
      <dc:creator>Brad Bowman</dc:creator>
      <dc:date>2025-10-08T15:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: Dependent variable: Variable is dependent on number of users in list collector variable</title>
      <link>https://www.servicenow.com/community/community-central-forum/dependent-variable-variable-is-dependent-on-number-of-users-in/m-p/3401121#M5028</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/666304"&gt;@ChristineH85739&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please follow script shared by&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/174062"&gt;@Brad Bowman &lt;/a&gt;&amp;nbsp;and that should solve your requirement.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":light_bulb:"&gt;💡&lt;/span&gt; If my response helped, please mark it as correct &lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt; and close the thread &lt;span class="lia-unicode-emoji" title=":locked:"&gt;🔒&lt;/span&gt; — this helps future readers find the solution faster! &lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Oct 2025 16:48:52 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/dependent-variable-variable-is-dependent-on-number-of-users-in/m-p/3401121#M5028</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2025-10-08T16:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: Dependent variable: Variable is dependent on number of users in list collector variable</title>
      <link>https://www.servicenow.com/community/community-central-forum/dependent-variable-variable-is-dependent-on-number-of-users-in/m-p/3506412#M6341</link>
      <description>&lt;P&gt;Thank you both&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2026 07:55:57 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/dependent-variable-variable-is-dependent-on-number-of-users-in/m-p/3506412#M6341</guid>
      <dc:creator>ChristineH85739</dc:creator>
      <dc:date>2026-03-12T07:55:57Z</dc:date>
    </item>
  </channel>
</rss>

