<?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 Unable to hide Variable set variables for one catalog item. in ITSM forum</title>
    <link>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799783#M371562</link>
    <description>&lt;P&gt;Hi Experts,&lt;/P&gt;
&lt;P&gt;I am unable to run my catalog UI policy on variables of Variable set&amp;nbsp; over Catalog UI Policy on Variable Set .&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried Catalog Client script on my catalog item to hide the variable set variables but no luck .&lt;/P&gt;
&lt;P&gt;I am using one variable set which is being used by more than 10 catalog items . On this variable set , two catalog UI policies are running which is taking precedence over catalog item UI policy .&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please help me out to achieve this .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in Advance&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 03 Jul 2020 12:35:33 GMT</pubDate>
    <dc:creator>shweta5</dc:creator>
    <dc:date>2020-07-03T12:35:33Z</dc:date>
    <item>
      <title>Unable to hide Variable set variables for one catalog item.</title>
      <link>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799783#M371562</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;
&lt;P&gt;I am unable to run my catalog UI policy on variables of Variable set&amp;nbsp; over Catalog UI Policy on Variable Set .&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried Catalog Client script on my catalog item to hide the variable set variables but no luck .&lt;/P&gt;
&lt;P&gt;I am using one variable set which is being used by more than 10 catalog items . On this variable set , two catalog UI policies are running which is taking precedence over catalog item UI policy .&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please help me out to achieve this .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in Advance&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2020 12:35:33 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799783#M371562</guid>
      <dc:creator>shweta5</dc:creator>
      <dc:date>2020-07-03T12:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to hide Variable set variables for one catalog item.</title>
      <link>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799784#M371563</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Change: Applies to --&amp;gt;&amp;nbsp;&lt;STRONG&gt;Catalog Item&lt;/STRONG&gt;&amp;nbsp;and select the&amp;nbsp;&lt;STRONG&gt;catalog item name&lt;/STRONG&gt;&amp;nbsp;instaed of&amp;nbsp;&lt;STRONG&gt;Variable set name&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Use this g_form.setDisplay('&lt;STRONG&gt;VARIABLE_SET_NAME'&lt;/STRONG&gt;,false); on UI Policy or Client Script.&lt;/P&gt;
&lt;P&gt;Replace '&lt;STRONG&gt;VARIABLE_SET_NAME&lt;/STRONG&gt;' with the name of your variable set.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="find_real_file.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/41290i8082CB7C7EFC45F0/image-size/large?v=v2&amp;amp;px=999" role="button" title="find_real_file.png" alt="find_real_file.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;If answer is helpful please mark correct!&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Pratiksha&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2020 12:41:12 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799784#M371563</guid>
      <dc:creator>Pratiksha Kalam</dc:creator>
      <dc:date>2020-07-03T12:41:12Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to hide Variable set variables for one catalog item.</title>
      <link>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799785#M371564</link>
      <description>&lt;P&gt;As you mentioned above, UI policies are running which is taking precedence over catalog item UI policy . but I think that is not from London release I read somewhere,&lt;/P&gt;
&lt;P&gt;UI policies are running which is taking precedence over catalog item UI policy .&amp;nbsp;&lt;/P&gt;
&lt;P&gt;see this article,&lt;/P&gt;
&lt;P&gt;&lt;A href="https://medium.com/@mvsabhishek/catalog-ui-policy-vs-variable-set-ui-policy-bug-71c821917fe9" rel="nofollow"&gt;https://medium.com/@mvsabhishek/catalog-ui-policy-vs-variable-set-ui-policy-bug-71c821917fe9&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2020 12:50:08 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799785#M371564</guid>
      <dc:creator>Pratiksha Kalam</dc:creator>
      <dc:date>2020-07-03T12:50:08Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to hide Variable set variables for one catalog item.</title>
      <link>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799786#M371565</link>
      <description>&lt;P&gt;Hi Pratiksha,&lt;/P&gt;
&lt;P&gt;Thanks for your Prompt response . I have tried this to hide few variables of one variable set but it is still same .&amp;nbsp;&lt;/P&gt;
&lt;P&gt;we are using one Variable set in which we have one select box .Visibility of the variable set Variables&amp;nbsp; depend on the Option we select&amp;nbsp;(This UI Policy is already working for Variable Set).&lt;/P&gt;
&lt;P&gt;But I am trying to hide two&amp;nbsp; more variables for this Variable set of my catalog item(new).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have used the below catalog Client Script on my catalog item but no luck again .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;if (g_form.getValue('var_user_type')=='Guest')&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;g_form.setVisible('variable_name_1',false);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; g_form.setVisible('variable_name_2',false);&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Thanks&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2020 12:15:42 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799786#M371565</guid>
      <dc:creator>shweta5</dc:creator>
      <dc:date>2020-07-06T12:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to hide Variable set variables for one catalog item.</title>
      <link>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799787#M371566</link>
      <description>&lt;P&gt;Hi Sheetal,&lt;/P&gt;
&lt;P&gt;So you want to hide those 2 variables within the variable set based on the other variable value var_user_type&lt;/P&gt;
&lt;P&gt;Is this for only few catalog items?&lt;/P&gt;
&lt;P&gt;Regards&lt;BR /&gt;ankur&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2020 12:49:13 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799787#M371566</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2020-07-06T12:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to hide Variable set variables for one catalog item.</title>
      <link>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799788#M371567</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Any update on this thread?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Pratiksha&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2020 15:27:17 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799788#M371567</guid>
      <dc:creator>Pratiksha Kalam</dc:creator>
      <dc:date>2020-07-06T15:27:17Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to hide Variable set variables for one catalog item.</title>
      <link>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799789#M371568</link>
      <description>&lt;P&gt;Hi Ankur,&lt;/P&gt;
&lt;P&gt;Thanks for your prompt response . Yes I need the same for now i am trying for only one catalog item.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 04:05:29 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799789#M371568</guid>
      <dc:creator>shweta5</dc:creator>
      <dc:date>2020-07-07T04:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to hide Variable set variables for one catalog item.</title>
      <link>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799790#M371569</link>
      <description>&lt;P&gt;Hi Sheetal,&lt;/P&gt;
&lt;P&gt;if you are currently looking for single catalog item then do this&lt;/P&gt;
&lt;P&gt;1) Applies to - variable set&lt;/P&gt;
&lt;P&gt;2) Type - onchange&lt;/P&gt;
&lt;P&gt;3) Variable set - give your variable set name here&lt;/P&gt;
&lt;P&gt;4) variable - var_user_type&lt;/P&gt;
&lt;P&gt;5) UI Type - ALL&lt;/P&gt;
&lt;P&gt;6) Script:&lt;/P&gt;
&lt;P&gt;Note: Ensure you give your catalog item sys_id in the script below so that it runs only 1 catalog item now&lt;/P&gt;
&lt;PRE class="language-javascript"&gt;&lt;CODE&gt;function onChange(control, oldValue, newValue, isLoading) {
	if (isLoading || newValue == '') {
		return;
	}

	var catItemSysId = g_form.getParameter("sysparm_id");

	if(catItemSysId == 'yourCatalogItemSysIdHere'){

		if (g_form.getValue('var_user_type')=='Guest'){
			g_form.setVisible('variable_name_1',false);
			g_form.setVisible('variable_name_2',false);
		}	
	}

	//Type appropriate comment here, and begin script below

}&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="find_real_file.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/41295i9DB542E011D57825/image-size/large?v=v2&amp;amp;px=999" role="button" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Regards&lt;BR /&gt;Ankur&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 06:08:48 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799790#M371569</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2020-07-07T06:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to hide Variable set variables for one catalog item.</title>
      <link>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799791#M371570</link>
      <description>&lt;P&gt;Hi Ankur,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks again . I tried this but its not working for me .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 10:20:50 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799791#M371570</guid>
      <dc:creator>shweta5</dc:creator>
      <dc:date>2020-07-07T10:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to hide Variable set variables for one catalog item.</title>
      <link>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799792#M371571</link>
      <description>&lt;P&gt;It might be due to one UI policy that is already&amp;nbsp; running on Variable set.&lt;/P&gt;
&lt;P&gt;I have unchecked this property also but no Luck&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="find_real_file.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/41296i7256CD10C1A91EA4/image-size/large?v=v2&amp;amp;px=999" role="button" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 10:24:04 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799792#M371571</guid>
      <dc:creator>shweta5</dc:creator>
      <dc:date>2020-07-07T10:24:04Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to hide Variable set variables for one catalog item.</title>
      <link>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799793#M371572</link>
      <description>&lt;P&gt;Hi Sheetal,&lt;/P&gt;
&lt;P&gt;Just to make sure it works just disable any other Catalog UI Policy or catalog client script on that variable set&lt;/P&gt;
&lt;P&gt;what happens when the value is changed? did you try adding alert and check?&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt; Also check correct catalog item sys_id and valid value of var_user_type, valid variables to hide&lt;/P&gt;
&lt;PRE class="language-javascript"&gt;&lt;CODE&gt;function onChange(control, oldValue, newValue, isLoading) {
	if (isLoading || newValue == '') {
		return;
	}

	var catItemSysId = g_form.getParameter("sysparm_id");

	if(catItemSysId == 'yourCatalogItemSysIdHere'){
          alert('Inside my catalog item sys id');
		if (g_form.getValue('var_user_type')=='Guest'){
                        alert('Inside hiding the variables');
			g_form.setVisible('variable_name_1',false);
			g_form.setVisible('variable_name_2',false);
		}	
	}

	//Type appropriate comment here, and begin script below

}&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Regards&lt;BR /&gt;Ankur&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 10:27:02 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799793#M371572</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2020-07-07T10:27:02Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to hide Variable set variables for one catalog item.</title>
      <link>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799794#M371573</link>
      <description>&lt;P&gt;yeppie we did it .&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many Thanks Ankur&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 12:38:06 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799794#M371573</guid>
      <dc:creator>shweta5</dc:creator>
      <dc:date>2020-07-07T12:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to hide Variable set variables for one catalog item.</title>
      <link>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799795#M371574</link>
      <description>&lt;P&gt;You are welcome&lt;/P&gt;
&lt;P&gt;Regards&lt;BR /&gt;Ankur&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2020 06:27:56 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799795#M371574</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2020-07-08T06:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to hide Variable set variables for one catalog item.</title>
      <link>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799796#M371575</link>
      <description>&lt;P&gt;Hi Ankur,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need your help again on this . I checked that script on Item it was working as i need&amp;nbsp; but when i checked that on service portal its showing me Javascript error in Catalog client script code for line.&amp;nbsp;&lt;/P&gt;
&lt;PRE class="language-javascript"&gt;&lt;CODE&gt;var catItemSysId = g_form.getParameter("sysparm_id");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please suggest how to take this error out .&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many Thanks ,&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2020 05:10:55 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799796#M371575</guid>
      <dc:creator>shweta5</dc:creator>
      <dc:date>2020-07-10T05:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to hide Variable set variables for one catalog item.</title>
      <link>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799797#M371576</link>
      <description>&lt;P&gt;Hi sheetal,&lt;/P&gt;
&lt;P&gt;that's correct for service portal it won't work&lt;/P&gt;
&lt;P&gt;possibly you should try to get the url parameter and check if that catalog item sys_id is present or not&lt;/P&gt;
&lt;P&gt;something like this&lt;/P&gt;
&lt;P&gt;var url = top.location.href;&lt;BR /&gt;var catalogItemSysId = new URLSearchParams(url).get("sys_id");&lt;/P&gt;
&lt;P&gt;Regards&lt;BR /&gt;Ankur&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2020 05:42:02 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799797#M371576</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2020-07-10T05:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to hide Variable set variables for one catalog item.</title>
      <link>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799798#M371577</link>
      <description>&lt;P&gt;No Luck Ankur , Please check the final script i wrote :&lt;/P&gt;
&lt;P&gt;function onChange(control, oldValue, newValue, isLoading) {&lt;BR /&gt; if (isLoading || newValue == '') {&lt;BR /&gt; return;&lt;BR /&gt; }&lt;/P&gt;
&lt;P&gt;var url = top.location.href;&lt;BR /&gt;var catalogItemSysId = new URLSearchParams(url).get("sys_id");&lt;/P&gt;
&lt;P&gt;if(catalogItemSysId =='Sys ID of ITEM'){&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt; if (g_form.getValue('var_user_type')=='New User'){&lt;BR /&gt; g_form.setVisible('Variable1_name',false);&lt;BR /&gt; g_form.setVisible('variable2_name ',false);&lt;BR /&gt; } &lt;BR /&gt; }&lt;/P&gt;
&lt;P&gt;}&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2020 08:39:50 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799798#M371577</guid>
      <dc:creator>shweta5</dc:creator>
      <dc:date>2020-07-10T08:39:50Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to hide Variable set variables for one catalog item.</title>
      <link>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799799#M371578</link>
      <description>&lt;P&gt;Hi Sheetal,&lt;/P&gt;
&lt;P&gt;you need to check in the script whether it is portal or not and use that code accordingly to get the parameter from url&lt;/P&gt;
&lt;P&gt;Refer updated script below&lt;/P&gt;
&lt;PRE class="language-javascript"&gt;&lt;CODE&gt;function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}

var catalogItemSysId = '';

if(window == null){

// this is portal

var url = top.location.href;
catalogItemSysId = new URLSearchParams(url).get("sys_id");

}

else{

// native

catalogItemSysId = g_form.getParameter("sysparm_id");

}

if(catalogItemSysId == 'Sys ID of ITEM'){

if (g_form.getValue('var_user_type')=='New User'){
g_form.setVisible('Variable1_name',false);
g_form.setVisible('variable2_name ',false);
}

}

}&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Regards&lt;BR /&gt;Ankur&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2020 10:22:03 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799799#M371578</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2020-07-10T10:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to hide Variable set variables for one catalog item.</title>
      <link>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799800#M371579</link>
      <description>&lt;P&gt;I tried a lot its not working on portal . Hence dropping this plan will define&amp;nbsp; another variable set for this item .&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks Ankur .&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2020 12:19:21 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799800#M371579</guid>
      <dc:creator>shweta5</dc:creator>
      <dc:date>2020-07-10T12:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to hide Variable set variables for one catalog item.</title>
      <link>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799801#M371580</link>
      <description>&lt;P&gt;no worries&lt;/P&gt;
&lt;P&gt;Regards&lt;BR /&gt;Ankur&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jul 2020 13:42:54 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799801#M371580</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2020-07-11T13:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to hide Variable set variables for one catalog item.</title>
      <link>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799802#M371581</link>
      <description>&lt;P&gt;Hi Sheetal,&lt;/P&gt;
&lt;P&gt;Hope you are doing good.&lt;/P&gt;
&lt;P&gt;Let me know if I have answered your question.&lt;/P&gt;
&lt;P&gt;If so, please mark my response as correct &amp;amp; helpful so that this thread can be closed and others can be benefited by this.&lt;/P&gt;
&lt;P&gt;Regards&lt;BR /&gt;Ankur&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 05:57:51 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/unable-to-hide-variable-set-variables-for-one-catalog-item/m-p/799802#M371581</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2020-08-10T05:57:51Z</dc:date>
    </item>
  </channel>
</rss>

