<?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: Auto populate manager field from a lookup select box field in ITSM forum</title>
    <link>https://www.servicenow.com/community/itsm-forum/auto-populate-manager-field-from-a-lookup-select-box-field/m-p/581486#M153265</link>
    <description>&lt;P&gt;Hi Rohit,&lt;/P&gt;
&lt;P&gt;getReference() doesn't work on lookup select box.&lt;/P&gt;
&lt;P&gt;Refer below link if you require to use Lookup select box&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.servicenow.com/community?id=community_article&amp;amp;sys_id=1ce7dceedb5914101cd8a345ca961952" target="_blank"&gt;[SOLVED]: - Dependent variable on Catalog item using Lookup Select Box&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;OR&lt;/P&gt;
&lt;P&gt;Make both the variables as reference type&lt;/P&gt;
&lt;P&gt;Regards&lt;BR /&gt;Ankur&lt;/P&gt;</description>
    <pubDate>Mon, 07 Dec 2020 12:46:31 GMT</pubDate>
    <dc:creator>Ankur Bawiskar</dc:creator>
    <dc:date>2020-12-07T12:46:31Z</dc:date>
    <item>
      <title>Auto populate manager field from a lookup select box field</title>
      <link>https://www.servicenow.com/community/itsm-forum/auto-populate-manager-field-from-a-lookup-select-box-field/m-p/581483#M153262</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I have two fields namely User and Manager on a catalog form. Both these fields are of lookup select box type. The look up table for both is sys_user table.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to populate the value of manager field as soon as someone fills user field i.e The user which is selected in the user field, his/her manager name should populate on the manager field.&lt;/P&gt;
&lt;P&gt;I have seen a lot of articles regarding reference field but there is nothing related to look select box field. Any help would be appreciated,&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2020 12:20:28 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/auto-populate-manager-field-from-a-lookup-select-box-field/m-p/581483#M153262</guid>
      <dc:creator>Rohit54</dc:creator>
      <dc:date>2020-12-07T12:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: Auto populate manager field from a lookup select box field</title>
      <link>https://www.servicenow.com/community/itsm-forum/auto-populate-manager-field-from-a-lookup-select-box-field/m-p/581484#M153263</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Did you try out onChange Client Script on the User variable along with GlideAjax&lt;/P&gt;
&lt;P&gt;Regards&lt;BR /&gt;Ankur&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2020 12:35:30 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/auto-populate-manager-field-from-a-lookup-select-box-field/m-p/581484#M153263</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2020-12-07T12:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: Auto populate manager field from a lookup select box field</title>
      <link>https://www.servicenow.com/community/itsm-forum/auto-populate-manager-field-from-a-lookup-select-box-field/m-p/581485#M153264</link>
      <description>&lt;P&gt;Hi Ankur,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have used a onChange client script as follow:&lt;/P&gt;
&lt;P&gt;function onChange(control, oldValue, newValue, isLoading) {&lt;BR /&gt; if (newValue == '') {&lt;BR /&gt; g_form.clearValue('manager');&lt;BR /&gt; return;&lt;BR /&gt; }&lt;BR /&gt; var req = g_form.getReference('user', fillmanager);&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;function fillmanager(req) {&lt;BR /&gt; g_form.setValue('manager', req.manager);&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The variable name in the onChange was user.&lt;/P&gt;
&lt;P&gt;Please see the screenshot attached for more clarity&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2020 12:43:43 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/auto-populate-manager-field-from-a-lookup-select-box-field/m-p/581485#M153264</guid>
      <dc:creator>Rohit54</dc:creator>
      <dc:date>2020-12-07T12:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: Auto populate manager field from a lookup select box field</title>
      <link>https://www.servicenow.com/community/itsm-forum/auto-populate-manager-field-from-a-lookup-select-box-field/m-p/581486#M153265</link>
      <description>&lt;P&gt;Hi Rohit,&lt;/P&gt;
&lt;P&gt;getReference() doesn't work on lookup select box.&lt;/P&gt;
&lt;P&gt;Refer below link if you require to use Lookup select box&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.servicenow.com/community?id=community_article&amp;amp;sys_id=1ce7dceedb5914101cd8a345ca961952" target="_blank"&gt;[SOLVED]: - Dependent variable on Catalog item using Lookup Select Box&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;OR&lt;/P&gt;
&lt;P&gt;Make both the variables as reference type&lt;/P&gt;
&lt;P&gt;Regards&lt;BR /&gt;Ankur&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2020 12:46:31 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/auto-populate-manager-field-from-a-lookup-select-box-field/m-p/581486#M153265</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2020-12-07T12:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: Auto populate manager field from a lookup select box field</title>
      <link>https://www.servicenow.com/community/itsm-forum/auto-populate-manager-field-from-a-lookup-select-box-field/m-p/581487#M153266</link>
      <description>&lt;P&gt;Hi Rohit ,&lt;/P&gt;
&lt;P&gt;No scripting is required for this use case. You can&amp;nbsp;accomplish this via Reference qualifier&lt;/P&gt;
&lt;P&gt;1. In the first lookup select box set the Lookup Value field to SysId and Lookup Label to which ever field you want to display&lt;/P&gt;
&lt;P&gt;2. Now in the second lookup select box set the lookup value field to what ever field you want and Lookup&amp;nbsp;Label to Manager field with reference qualifier value as&amp;nbsp;javascript:'sys_id='+current.variables.PASS FIRST LOOKUP SELECTBOX VARIABLE NAME HERE; and update the variable attribute as&amp;nbsp;ref_qual_elements=PASS FIRST LOOKUP SELECTBOX VARIABLE NAME HERE&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Pradeep Sharma&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2020 17:42:56 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/auto-populate-manager-field-from-a-lookup-select-box-field/m-p/581487#M153266</guid>
      <dc:creator>Pradeep Sharma</dc:creator>
      <dc:date>2020-12-07T17:42:56Z</dc:date>
    </item>
  </channel>
</rss>

