<?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 FieldElement and visibilityExpression in FeatureForm in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/fieldelement-and-visibilityexpression-in/m-p/1341768#M82556</link>
    <description>&lt;P&gt;I have two elements&amp;nbsp; in the FeatureForm widget and I want to hide the second as long the first is blank.&amp;nbsp; Once something is input in the first element then the second should appear.&lt;/P&gt;&lt;P&gt;This is similar to the Smart Editor functionality in WAB.&lt;/P&gt;&lt;P&gt;I tried this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;elements: [{
            // Autocasts to new GroupElement
            type: "group",
            label: "Testing",
            elements: [{ // Autocasts to new FieldElement
              type: "field",
              fieldName: "first",
              label: "First"
            },
            {
              type: "field",
              fieldName: "second",
              label: "Second",
              visibilityExpression: "IIF(!IsEmpty($feature.first))"
            }
            ]
          }, &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/6522"&gt;@JoelBennett&lt;/a&gt;&amp;nbsp;?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 26 Oct 2023 16:35:41 GMT</pubDate>
    <dc:creator>LefterisKoumis</dc:creator>
    <dc:date>2023-10-26T16:35:41Z</dc:date>
    <item>
      <title>FieldElement and visibilityExpression in FeatureForm</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/fieldelement-and-visibilityexpression-in/m-p/1341768#M82556</link>
      <description>&lt;P&gt;I have two elements&amp;nbsp; in the FeatureForm widget and I want to hide the second as long the first is blank.&amp;nbsp; Once something is input in the first element then the second should appear.&lt;/P&gt;&lt;P&gt;This is similar to the Smart Editor functionality in WAB.&lt;/P&gt;&lt;P&gt;I tried this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;elements: [{
            // Autocasts to new GroupElement
            type: "group",
            label: "Testing",
            elements: [{ // Autocasts to new FieldElement
              type: "field",
              fieldName: "first",
              label: "First"
            },
            {
              type: "field",
              fieldName: "second",
              label: "Second",
              visibilityExpression: "IIF(!IsEmpty($feature.first))"
            }
            ]
          }, &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/6522"&gt;@JoelBennett&lt;/a&gt;&amp;nbsp;?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2023 16:35:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/fieldelement-and-visibilityexpression-in/m-p/1341768#M82556</guid>
      <dc:creator>LefterisKoumis</dc:creator>
      <dc:date>2023-10-26T16:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: FieldElement and visibilityExpression in FeatureForm</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/fieldelement-and-visibilityexpression-in/m-p/1342209#M82571</link>
      <description>&lt;P&gt;As seen in the documentation for the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-form-elements-Element.html#visibilityExpression" target="_self"&gt;visibilityExpression&lt;/A&gt; property, you cannot use this property to define your Arcade expression.&amp;nbsp; Instead, it must reference a value in the&amp;nbsp;&lt;SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-form-FormTemplate.html#expressionInfos" target="_self"&gt;expressionInfos&lt;/A&gt; collection, which is where your Arcade expression must go.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;There's an example nearly identical to what you're trying to do in the &lt;A href="https://developers.arcgis.com/javascript/latest/arcade/#forms" target="_self"&gt;Form Constraint&lt;/A&gt; section of the Arcade reference page that will probably help.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2023 17:58:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/fieldelement-and-visibilityexpression-in/m-p/1342209#M82571</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2023-10-26T17:58:01Z</dc:date>
    </item>
  </channel>
</rss>

