<?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 Load the logged in User name into a Variable Set in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/load-the-logged-in-user-name-into-a-variable-set/m-p/2907338#M1107500</link>
    <description>&lt;P&gt;&lt;STRONG&gt;Hey guys!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Has anyone done any development with the following requirement:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;This POST was edited:&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I have 2 RECORD PRODUCERS. In the first RP, the user will answer some questions and submit. The information as we know it will be saved in the destination table that we previously defined.&lt;/P&gt;&lt;P&gt;In the second RECORD PRODUCER, I have some unique fields from it. However, I also have a variable of type reference, which takes the numbers of the records created in the first RP. In other words, I have information about the fields of each record. And according to the number selected by the user, I can populate the fields according to some responses from the first RP.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As an example, if in RP1 I fill in a choice field as "Yes", a certain field in RP2 will be filled in with that value and display another field. (This already works through a Script Include - Client Callable and a Client Script that makes the GLIDEAJAX call, when the field changes).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The current requirement, in some way, meets what was previously described. In this second RECORD PRODUCER, I have an MRVS created, with a reference type variable for sys_user.&lt;/P&gt;&lt;P&gt;When a certain checkbox type field (in RP1) is marked, I need to fill in this MRVS with the logged in user record. My question is: Can I accomplish this with the same Script Include + Client Script process? Even though it is MRVS, because I did the other cases with variables only.&lt;/P&gt;</description>
    <pubDate>Thu, 25 Apr 2024 12:18:05 GMT</pubDate>
    <dc:creator>Luis Henrique1</dc:creator>
    <dc:date>2024-04-25T12:18:05Z</dc:date>
    <item>
      <title>Load the logged in User name into a Variable Set</title>
      <link>https://www.servicenow.com/community/developer-forum/load-the-logged-in-user-name-into-a-variable-set/m-p/2907338#M1107500</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Hey guys!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Has anyone done any development with the following requirement:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;This POST was edited:&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I have 2 RECORD PRODUCERS. In the first RP, the user will answer some questions and submit. The information as we know it will be saved in the destination table that we previously defined.&lt;/P&gt;&lt;P&gt;In the second RECORD PRODUCER, I have some unique fields from it. However, I also have a variable of type reference, which takes the numbers of the records created in the first RP. In other words, I have information about the fields of each record. And according to the number selected by the user, I can populate the fields according to some responses from the first RP.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As an example, if in RP1 I fill in a choice field as "Yes", a certain field in RP2 will be filled in with that value and display another field. (This already works through a Script Include - Client Callable and a Client Script that makes the GLIDEAJAX call, when the field changes).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The current requirement, in some way, meets what was previously described. In this second RECORD PRODUCER, I have an MRVS created, with a reference type variable for sys_user.&lt;/P&gt;&lt;P&gt;When a certain checkbox type field (in RP1) is marked, I need to fill in this MRVS with the logged in user record. My question is: Can I accomplish this with the same Script Include + Client Script process? Even though it is MRVS, because I did the other cases with variables only.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2024 12:18:05 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/load-the-logged-in-user-name-into-a-variable-set/m-p/2907338#M1107500</guid>
      <dc:creator>Luis Henrique1</dc:creator>
      <dc:date>2024-04-25T12:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: Load the logged in User name into a Variable Set</title>
      <link>https://www.servicenow.com/community/developer-forum/load-the-logged-in-user-name-into-a-variable-set/m-p/2907447#M1107536</link>
      <description>&lt;P&gt;Hi Luis,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I'm understanding your issue, you have the correct value being inserted On Load.&amp;nbsp; If that is what need to be there, I'd say that in your On Load as part of the processing, just make that variable read only.&amp;nbsp; If you can't do that, add an On Change rule that will take care of these two situations:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;if isLoading is true, apply your On Load logic (having turned off the on load script)&lt;/LI&gt;
&lt;LI&gt;if the value is changed have your script replace the value with oldValue&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;And if you want to be really diligent, include a business rule, before insert, that enforces the requirement about the user.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please let me know if I've missed your issue.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 20:33:05 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/load-the-logged-in-user-name-into-a-variable-set/m-p/2907447#M1107536</guid>
      <dc:creator>johnfeist</dc:creator>
      <dc:date>2024-04-23T20:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: Load the logged in User name into a Variable Set</title>
      <link>https://www.servicenow.com/community/developer-forum/load-the-logged-in-user-name-into-a-variable-set/m-p/2908406#M1107809</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/147012"&gt;@Luis Henrique1&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;for the onload script you can use onchange client script&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;In this function write the code :&amp;nbsp;g_user.userID(); or if server side use gs.getUserID() and return from script include to client script.&amp;nbsp;&lt;BR /&gt;&lt;STRONG&gt;if (isLoading || newValue === '') {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;return;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2024 12:45:39 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/load-the-logged-in-user-name-into-a-variable-set/m-p/2908406#M1107809</guid>
      <dc:creator>AnimeshP_96</dc:creator>
      <dc:date>2024-04-24T12:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: Load the logged in User name into a Variable Set</title>
      <link>https://www.servicenow.com/community/developer-forum/load-the-logged-in-user-name-into-a-variable-set/m-p/2908987#M1107986</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/340887"&gt;@johnfeist&lt;/a&gt;&amp;nbsp;!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for your response.&lt;/P&gt;&lt;P&gt;I believe I explained it in a confusing way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will try to explain the requirement again.&lt;/P&gt;&lt;P&gt;I have 2 RECORD PRODUCERS. In the first RP, the user will answer some questions and submit. The information as we know it will be saved in the destination table that we previously defined.&lt;/P&gt;&lt;P&gt;In the second RECORD PRODUCER, I have some unique fields from it. However, I also have a variable of type reference, which takes the numbers of the records created in the first RP. In other words, I have information about the fields of each record. And according to the number selected by the user, I can populate the fields according to some responses from the first RP.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As an example, if in RP1 I fill in a choice field as "Yes", a certain field in RP2 will be filled in with that value and display another field. (This already works through a Script Include - Client Callable and a Client Script that makes the GLIDEAJAX call, when the field changes).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The current requirement, in some way, meets what was previously described. In this second RECORD PRODUCER, I have an MRVS created, with a reference type variable for sys_user.&lt;/P&gt;&lt;P&gt;When a certain checkbox type field (in RP1) is marked, I need to fill in this MRVS with the logged in user record. My question is: Can I accomplish this with the same Script Include + Client Script process? Even though it is MRVS, because I did the other cases with variables only.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2024 18:57:27 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/load-the-logged-in-user-name-into-a-variable-set/m-p/2908987#M1107986</guid>
      <dc:creator>Luis Henrique1</dc:creator>
      <dc:date>2024-04-24T18:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: Load the logged in User name into a Variable Set</title>
      <link>https://www.servicenow.com/community/developer-forum/load-the-logged-in-user-name-into-a-variable-set/m-p/2908988#M1107987</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/77077"&gt;@AnimeshP_96&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for your response.&lt;/P&gt;&lt;P&gt;I believe I explained it in a confusing way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will try to explain the requirement again.&lt;/P&gt;&lt;P&gt;I have 2 RECORD PRODUCERS. In the first RP, the user will answer some questions and submit. The information as we know it will be saved in the destination table that we previously defined.&lt;/P&gt;&lt;P&gt;In the second RECORD PRODUCER, I have some unique fields from it. However, I also have a variable of type reference, which takes the numbers of the records created in the first RP. In other words, I have information about the fields of each record. And according to the number selected by the user, I can populate the fields according to some responses from the first RP.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As an example, if in RP1 I fill in a choice field as "Yes", a certain field in RP2 will be filled in with that value and display another field. (This already works through a Script Include - Client Callable and a Client Script that makes the GLIDEAJAX call, when the field changes).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The current requirement, in some way, meets what was previously described. In this second RECORD PRODUCER, I have an MRVS created, with a reference type variable for sys_user.&lt;/P&gt;&lt;P&gt;When a certain checkbox type field (in RP1) is marked, I need to fill in this MRVS with the logged in user record. My question is: Can I accomplish this with the same Script Include + Client Script process? Even though it is MRVS, because I did the other cases with variables only.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2024 18:56:58 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/load-the-logged-in-user-name-into-a-variable-set/m-p/2908988#M1107987</guid>
      <dc:creator>Luis Henrique1</dc:creator>
      <dc:date>2024-04-24T18:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: Load the logged in User name into a Variable Set</title>
      <link>https://www.servicenow.com/community/developer-forum/load-the-logged-in-user-name-into-a-variable-set/m-p/2910014#M1108273</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/147012"&gt;@Luis Henrique1&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Maybe you have to DOM and write code for MRVS as IO: and yes this could work SI + Client script&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2024 12:40:28 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/load-the-logged-in-user-name-into-a-variable-set/m-p/2910014#M1108273</guid>
      <dc:creator>AnimeshP_96</dc:creator>
      <dc:date>2024-04-25T12:40:28Z</dc:date>
    </item>
  </channel>
</rss>

