<?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: To call one of the script include function in another function of the same script include in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/to-call-one-of-the-script-include-function-in-another-function/m-p/2517828#M980922</link>
    <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/361585"&gt;@Dinesh90&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;unless Test function returns this you cannot access it&lt;/P&gt;</description>
    <pubDate>Mon, 27 Mar 2023 14:31:07 GMT</pubDate>
    <dc:creator>Ankur Bawiskar</dc:creator>
    <dc:date>2023-03-27T14:31:07Z</dc:date>
    <item>
      <title>To call one of the script include function in another function of the same script include</title>
      <link>https://www.servicenow.com/community/developer-forum/to-call-one-of-the-script-include-function-in-another-function/m-p/2517245#M980642</link>
      <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;This is regarding one of my requirement&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to use one of the variable value which is in one of the function in script include.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to use this variable value in another function which is in the same script include.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to call one function to another function in the same script include and how to use the variable value of one function to another function in same script include.&lt;/P&gt;&lt;P&gt;Also , the variable value is getting returned to the glide ajax call in the function and I want to use the same variable value in another function in same script include.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Script include is the Client callable one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help with the logic and code.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 07:26:12 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/to-call-one-of-the-script-include-function-in-another-function/m-p/2517245#M980642</guid>
      <dc:creator>Dinesh90</dc:creator>
      <dc:date>2023-03-27T07:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: To call one of the script include function in another function of the same script include</title>
      <link>https://www.servicenow.com/community/developer-forum/to-call-one-of-the-script-include-function-in-another-function/m-p/2517255#M980647</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/361585"&gt;@Dinesh90&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you can call function of same script include within another function using this syntax and also you can pass the value to that function which is getting called&lt;/P&gt;
&lt;P&gt;this.myFunction(variable);&lt;/P&gt;
&lt;P&gt;It will be nice if you share the existing scripts and what you tried and what's not working as per expectations&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 07:35:44 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/to-call-one-of-the-script-include-function-in-another-function/m-p/2517255#M980647</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2023-03-27T07:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: To call one of the script include function in another function of the same script include</title>
      <link>https://www.servicenow.com/community/developer-forum/to-call-one-of-the-script-include-function-in-another-function/m-p/2517618#M980823</link>
      <description>&lt;P&gt;Thank&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/265966"&gt;@Ankur Bawiskar&lt;/a&gt;&amp;nbsp;for the reply..&lt;/P&gt;&lt;P&gt;so as per the syntax you have mentioned -&amp;nbsp;&lt;SPAN&gt;this.myFunction(variable);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I am taking one example here -&lt;/P&gt;&lt;P&gt;First function&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TEST : function (){&lt;/P&gt;&lt;P&gt;var abc = ' ' ;&lt;/P&gt;&lt;P&gt;doing some logic&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;return abc ;&amp;nbsp; &amp;nbsp;/// returning the abc variable in this function&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Second function :&lt;/P&gt;&lt;P&gt;Demo : function (){&lt;/P&gt;&lt;P&gt;// need to use the&amp;nbsp; abc variable in this function&amp;nbsp;&lt;/P&gt;&lt;P&gt;this.TEST(abc);&amp;nbsp;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can we do like this, I need to use the value of abc variable (which is in TEST function) in DEMO function.&lt;/P&gt;&lt;P&gt;should I store - this.TEST(abc) to any variable like below ?&lt;/P&gt;&lt;P&gt;var xyz = this.TEST(abc);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do I need to pass the abc value as a parameter in DEMO function as well while declaration like below ?&lt;/P&gt;&lt;P&gt;Demo : function (abc){&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 12:13:46 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/to-call-one-of-the-script-include-function-in-another-function/m-p/2517618#M980823</guid>
      <dc:creator>Dinesh90</dc:creator>
      <dc:date>2023-03-27T12:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: To call one of the script include function in another function of the same script include</title>
      <link>https://www.servicenow.com/community/developer-forum/to-call-one-of-the-script-include-function-in-another-function/m-p/2517677#M980847</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/361585"&gt;@Dinesh90&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it would be like this&lt;/P&gt;
&lt;P&gt;var xyz = this.TEST();&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 12:45:41 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/to-call-one-of-the-script-include-function-in-another-function/m-p/2517677#M980847</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2023-03-27T12:45:41Z</dc:date>
    </item>
    <item>
      <title>Re: To call one of the script include function in another function of the same script include</title>
      <link>https://www.servicenow.com/community/developer-forum/to-call-one-of-the-script-include-function-in-another-function/m-p/2517706#M980860</link>
      <description>&lt;P&gt;so&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/265966"&gt;@Ankur Bawiskar&lt;/a&gt;&amp;nbsp; ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var xyz = this.TEST();&amp;nbsp; &amp;nbsp;// adding this line in my DEMO function , will do the job ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;as I need to use the variable value "abc"&amp;nbsp; in DEMO function&amp;nbsp;which is stored in TEST function.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks !&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 13:07:13 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/to-call-one-of-the-script-include-function-in-another-function/m-p/2517706#M980860</guid>
      <dc:creator>Dinesh90</dc:creator>
      <dc:date>2023-03-27T13:07:13Z</dc:date>
    </item>
    <item>
      <title>Re: To call one of the script include function in another function of the same script include</title>
      <link>https://www.servicenow.com/community/developer-forum/to-call-one-of-the-script-include-function-in-another-function/m-p/2517828#M980922</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/361585"&gt;@Dinesh90&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;unless Test function returns this you cannot access it&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 14:31:07 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/to-call-one-of-the-script-include-function-in-another-function/m-p/2517828#M980922</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2023-03-27T14:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: To call one of the script include function in another function of the same script include</title>
      <link>https://www.servicenow.com/community/developer-forum/to-call-one-of-the-script-include-function-in-another-function/m-p/2517904#M980959</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/265966"&gt;@Ankur Bawiskar&lt;/a&gt;&amp;nbsp;Thanks Ankur it worked&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 15:14:51 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/to-call-one-of-the-script-include-function-in-another-function/m-p/2517904#M980959</guid>
      <dc:creator>Dinesh90</dc:creator>
      <dc:date>2023-03-27T15:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: To call one of the script include function in another function of the same script include</title>
      <link>https://www.servicenow.com/community/developer-forum/to-call-one-of-the-script-include-function-in-another-function/m-p/3130387#M1165978</link>
      <description>&lt;P&gt;Hi Dinesh,&lt;BR /&gt;We can store varaibles in property objcet like(this.variableName)&lt;BR /&gt;Example:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;myFunc: &lt;/SPAN&gt;&lt;SPAN&gt;function&lt;/SPAN&gt;&lt;SPAN&gt;(){&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.a=&lt;/SPAN&gt;&lt;SPAN&gt;"Test"&lt;/SPAN&gt;&lt;SPAN&gt;; &lt;/SPAN&gt;&lt;SPAN&gt;// Store variable value into properties of the object (this)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.b = &lt;/SPAN&gt;&lt;SPAN&gt;"Test1"&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.a+&lt;/SPAN&gt;&lt;SPAN&gt;" "&lt;/SPAN&gt;&lt;SPAN&gt;+&lt;/SPAN&gt;&lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.b;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; },&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; myDemo: &lt;/SPAN&gt;&lt;SPAN&gt;function&lt;/SPAN&gt;&lt;SPAN&gt;(){&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; d = &lt;/SPAN&gt;&lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.myFunc(); // call function&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gs.log(&lt;/SPAN&gt;&lt;SPAN&gt;"Function variable a: "&lt;/SPAN&gt;&lt;SPAN&gt;+ &lt;/SPAN&gt;&lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.a);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gs.log(&lt;/SPAN&gt;&lt;SPAN&gt;"Function variable b: "&lt;/SPAN&gt;&lt;SPAN&gt;+ &lt;/SPAN&gt;&lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.b);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; },&lt;BR /&gt;&lt;BR /&gt;If my solution is correct, please mark as Helpful&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Keshav&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 18 Dec 2024 05:25:48 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/to-call-one-of-the-script-include-function-in-another-function/m-p/3130387#M1165978</guid>
      <dc:creator>Keshav72</dc:creator>
      <dc:date>2024-12-18T05:25:48Z</dc:date>
    </item>
  </channel>
</rss>

