<?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: Based on selecting 'location type' as country, state should autopopulate is another field in mrv in ITSM forum</title>
    <link>https://www.servicenow.com/community/itsm-forum/based-on-selecting-location-type-as-country-state-should/m-p/3066881#M529156</link>
    <description>&lt;P&gt;What is the variable type of 'parent'?&amp;nbsp; If it is a single row text and you mean this variable should literally be populated with either 'State' or 'sites', you can use an onChange Catalog Client Script within the MRVS:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;function onChange(control, oldValue, newValue, isLoading) {
   if (isLoading || newValue == '') {
      return;
   }
    if (newValue == 'Region') {
        g_form.setValue('parent', 'State');
    }
    if (newValue == 'country') {
        g_form.setValue('parent', 'sites');
    }
}&lt;/LI-CODE&gt;
&lt;P&gt;Use your variable name for the 'parent' variable, and values, not labels for the location type.&lt;/P&gt;</description>
    <pubDate>Mon, 07 Oct 2024 15:46:34 GMT</pubDate>
    <dc:creator>Brad Bowman</dc:creator>
    <dc:date>2024-10-07T15:46:34Z</dc:date>
    <item>
      <title>Based on selecting 'location type' as country, state should autopopulate is another field in mrvs.</title>
      <link>https://www.servicenow.com/community/itsm-forum/based-on-selecting-location-type-as-country-state-should/m-p/3066806#M529153</link>
      <description>&lt;P&gt;Hi All,&lt;BR /&gt;&lt;BR /&gt;To add a new location in cmn_location table, I have a mrvs where when user selects a location type say &lt;STRONG&gt;Region&lt;/STRONG&gt; or &lt;STRONG&gt;country&lt;/STRONG&gt;, then &lt;FONT color="#FF0000"&gt;S&lt;STRONG&gt;tate&lt;/STRONG&gt; &lt;/FONT&gt;should present in below parent field.&lt;BR /&gt;Similarly when user selects &lt;FONT color="#FF0000"&gt;City&amp;nbsp;&lt;/FONT&gt;in location type, parent field should populate &lt;FONT color="#FF0000"&gt;sites.&amp;nbsp;&lt;FONT color="#003366"&gt;&lt;BR /&gt;How to achieve this requirement ?&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#003366"&gt;Refer Below attached snips for better understanding.&lt;/FONT&gt;&lt;FONT color="#FF0000"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2024 15:13:18 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/based-on-selecting-location-type-as-country-state-should/m-p/3066806#M529153</guid>
      <dc:creator>snriya</dc:creator>
      <dc:date>2024-10-07T15:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: Based on selecting 'location type' as country, state should autopopulate is another field in mrv</title>
      <link>https://www.servicenow.com/community/itsm-forum/based-on-selecting-location-type-as-country-state-should/m-p/3066881#M529156</link>
      <description>&lt;P&gt;What is the variable type of 'parent'?&amp;nbsp; If it is a single row text and you mean this variable should literally be populated with either 'State' or 'sites', you can use an onChange Catalog Client Script within the MRVS:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;function onChange(control, oldValue, newValue, isLoading) {
   if (isLoading || newValue == '') {
      return;
   }
    if (newValue == 'Region') {
        g_form.setValue('parent', 'State');
    }
    if (newValue == 'country') {
        g_form.setValue('parent', 'sites');
    }
}&lt;/LI-CODE&gt;
&lt;P&gt;Use your variable name for the 'parent' variable, and values, not labels for the location type.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2024 15:46:34 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/based-on-selecting-location-type-as-country-state-should/m-p/3066881#M529156</guid>
      <dc:creator>Brad Bowman</dc:creator>
      <dc:date>2024-10-07T15:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: Based on selecting 'location type' as country, state should autopopulate is another field in mrv</title>
      <link>https://www.servicenow.com/community/itsm-forum/based-on-selecting-location-type-as-country-state-should/m-p/3066893#M529160</link>
      <description>&lt;P&gt;Parent is a reference field which will populate values acc to selected location type.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2024 15:57:41 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/based-on-selecting-location-type-as-country-state-should/m-p/3066893#M529160</guid>
      <dc:creator>snriya</dc:creator>
      <dc:date>2024-10-07T15:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: Based on selecting 'location type' as country, state should autopopulate is another field in mrv</title>
      <link>https://www.servicenow.com/community/itsm-forum/based-on-selecting-location-type-as-country-state-should/m-p/3066911#M529163</link>
      <description>&lt;P&gt;If the parent variable is a reference to the cmn_location table, then instead of the onChange script the reference qualifier will be something like:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BradBowman_0-1728317672787.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/392834i3CD4DBFCDE62FD97/image-dimensions/680x51?v=v2" alt="BradBowman_0-1728317672787.png" title="BradBowman_0-1728317672787.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Using your variable name for the location type MRVS variable.&amp;nbsp; The choice values for the location type MRVS variable must match those of the cmn_location_type field, so if you're not using a lookup select box type variable, or a choice list, make sure they are 'region' and 'country'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2024 16:17:33 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/based-on-selecting-location-type-as-country-state-should/m-p/3066911#M529163</guid>
      <dc:creator>Brad Bowman</dc:creator>
      <dc:date>2024-10-07T16:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: Based on selecting 'location type' as country, state should autopopulate is another field in mrv</title>
      <link>https://www.servicenow.com/community/itsm-forum/based-on-selecting-location-type-as-country-state-should/m-p/3067015#M529168</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I tried this way but it is giving me &lt;FONT color="#FF0000"&gt;parent&lt;/FONT&gt; as countries (in reference) when i am giving &lt;FONT color="#FF0000"&gt;location type&lt;/FONT&gt; variable name as country.&lt;BR /&gt;I want &lt;STRONG&gt;Parent as states&lt;/STRONG&gt; on selecting &lt;STRONG&gt;location type as country. &lt;/STRONG&gt;Please correct me if i misunderstood something here.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="snriya_0-1728321400317.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/392876i4B5F480FF384998A/image-size/medium?v=v2&amp;amp;px=400" alt="snriya_0-1728321400317.png" title="snriya_0-1728321400317.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="snriya_1-1728322078113.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/392881i308B617BFBC7857C/image-size/medium?v=v2&amp;amp;px=400" alt="snriya_1-1728322078113.png" title="snriya_1-1728322078113.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="snriya_2-1728322107178.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/392883iCE154C3E6F24F69D/image-size/medium?v=v2&amp;amp;px=400" alt="snriya_2-1728322107178.png" title="snriya_2-1728322107178.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2024 17:28:58 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/based-on-selecting-location-type-as-country-state-should/m-p/3067015#M529168</guid>
      <dc:creator>snriya</dc:creator>
      <dc:date>2024-10-07T17:28:58Z</dc:date>
    </item>
  </channel>
</rss>

