<?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>topic Re: Attribute Rule to auto-populate a field based on another field in the same feature class in Attribute Rules Questions</title>
    <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-to-auto-populate-a-field-based-on/m-p/1500250#M1508</link>
    <description>&lt;P&gt;This is great, thank you! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Works perfectly.&lt;/P&gt;</description>
    <pubDate>Tue, 02 Jul 2024 12:12:08 GMT</pubDate>
    <dc:creator>SuzyFer</dc:creator>
    <dc:date>2024-07-02T12:12:08Z</dc:date>
    <item>
      <title>Attribute Rule to auto-populate a field based on another field in the same feature class</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-to-auto-populate-a-field-based-on/m-p/1490467#M1488</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I am attempting to auto-populate a field with a calculation (?) attribute rule, based on another field in the same feature class, could someone help me figure this out please? Being fairly new to arcade.&lt;BR /&gt;&lt;BR /&gt;I have 4 different fields containing habitat information and a main habitat field, for example:&lt;BR /&gt;level 1, level 2, level 3, level 4, &amp;amp; habitat.&lt;BR /&gt;&lt;BR /&gt;Not all levels will be populated necessarily, so I would like the habitat field to auto-populate with the value based on which one of these levels is populated. So for example, if level 4 is empty - I want to check if level 3 has a value. If so, auto-populate with that. If level 3 is empty, check level 2 for a value and use that, but again if empty, use the value from level 1.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2024 13:10:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-to-auto-populate-a-field-based-on/m-p/1490467#M1488</guid>
      <dc:creator>SuzyFer</dc:creator>
      <dc:date>2024-06-12T13:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rule to auto-populate a field based on another field in the same feature class</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-to-auto-populate-a-field-based-on/m-p/1494302#M1493</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/665001"&gt;@SuzyFer&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;&lt;P&gt;There are other ways you can do this but this is the most simplistic.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var level4 = $feature.level4;
var level3 = $feature.level3;
var level2 = $feature.level2;
var level1 = $feature.level1;

var result;

if (!IsEmpty(level4)) {
  result = level4;
} else if (!IsEmpty(level3)) {
  result = level3;
} else if (!IsEmpty(level2)) {
  result = level2;
} else if (!IsEmpty(level1)) {
  result = level1;
}

return result;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6355226684112w504h290r894" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6355226684112" data-account="6161463677001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6161463677001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6355226684112w504h290r894');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://community.esri.com/t5/video/gallerypage/video-id/6355226684112"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;~Jake&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 11:18:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-to-auto-populate-a-field-based-on/m-p/1494302#M1493</guid>
      <dc:creator>Jake_S</dc:creator>
      <dc:date>2024-06-18T11:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rule to auto-populate a field based on another field in the same feature class</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-to-auto-populate-a-field-based-on/m-p/1500250#M1508</link>
      <description>&lt;P&gt;This is great, thank you! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Works perfectly.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 12:12:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-to-auto-populate-a-field-based-on/m-p/1500250#M1508</guid>
      <dc:creator>SuzyFer</dc:creator>
      <dc:date>2024-07-02T12:12:08Z</dc:date>
    </item>
  </channel>
</rss>

