<?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 Is it possible to apply conditional visibility per attribute for feature popups in Field Maps? in ArcGIS Field Maps Questions</title>
    <link>https://community.esri.com/t5/arcgis-field-maps-questions/is-it-possible-to-apply-conditional-visibility-per/m-p/1265809#M5529</link>
    <description>&lt;P&gt;I have a custom JSON template for a web map that I am using in Field Maps.&lt;/P&gt;&lt;P&gt;For a layer in the map, I can have conditional visibility in a feature creation/edit form using an Arcade expression for the "visibilityExpression" configuration. It works and the visibility is toggled as expected based on the Arcade Expression:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;"formInfo": {
    "formElements": [
        {
            "label": "MyAttribute",
            "type": "field",
            "visibilityExpression": "expr1",
            "editable": true,
            "fieldName": "MyAttribute",
            "inputType": {
                "type": "text-box",
                "minLength": 0
            }
        }
    ],
    "expressionInfos": [
        {
            "expression": "DomainName($feature, \"TYPE\") == \"TYPE1\"",
            "name": "expr1",
            "returnType": "boolean",
            "title": "Attribute Expression"
        }
    ]
},&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;however, it seems like it doesn't work for the regular popup that comes up when you tap a feature in Field Maps. I have tried applying "visibilityExpression" for "&lt;SPAN&gt;popupInfo", but it doesn't work for me:&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;"popupInfo": {
    "popupElements": [
        {
            "type": "fields"
        },
        {
            "type": "attachments",
            "displayType": "auto"
        }
    ],
    "fieldInfos": [
        {
            "fieldName": "MyAttribute",
            "format": {
                "digitSeparator": false,
                "places": 2
            },
            "isEditable": true,
            "label": "MyAttribute",
            "tooltip": "",
            "visibilityExpression": "expr1"
        }
    ],
    "expressionInfos": [
        {
            "expression": "DomainName($feature, \"TYPE\") == \"TYPE1\"",
            "name": "expr1",
            "returnType": "boolean",
            "title": "Attribute Expression"
        }
    ]
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;Is there a way to control the visibility for normal popups in Field Maps?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Mar 2023 23:11:37 GMT</pubDate>
    <dc:creator>VincentLantaca</dc:creator>
    <dc:date>2023-03-08T23:11:37Z</dc:date>
    <item>
      <title>Is it possible to apply conditional visibility per attribute for feature popups in Field Maps?</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/is-it-possible-to-apply-conditional-visibility-per/m-p/1265809#M5529</link>
      <description>&lt;P&gt;I have a custom JSON template for a web map that I am using in Field Maps.&lt;/P&gt;&lt;P&gt;For a layer in the map, I can have conditional visibility in a feature creation/edit form using an Arcade expression for the "visibilityExpression" configuration. It works and the visibility is toggled as expected based on the Arcade Expression:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;"formInfo": {
    "formElements": [
        {
            "label": "MyAttribute",
            "type": "field",
            "visibilityExpression": "expr1",
            "editable": true,
            "fieldName": "MyAttribute",
            "inputType": {
                "type": "text-box",
                "minLength": 0
            }
        }
    ],
    "expressionInfos": [
        {
            "expression": "DomainName($feature, \"TYPE\") == \"TYPE1\"",
            "name": "expr1",
            "returnType": "boolean",
            "title": "Attribute Expression"
        }
    ]
},&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;however, it seems like it doesn't work for the regular popup that comes up when you tap a feature in Field Maps. I have tried applying "visibilityExpression" for "&lt;SPAN&gt;popupInfo", but it doesn't work for me:&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;"popupInfo": {
    "popupElements": [
        {
            "type": "fields"
        },
        {
            "type": "attachments",
            "displayType": "auto"
        }
    ],
    "fieldInfos": [
        {
            "fieldName": "MyAttribute",
            "format": {
                "digitSeparator": false,
                "places": 2
            },
            "isEditable": true,
            "label": "MyAttribute",
            "tooltip": "",
            "visibilityExpression": "expr1"
        }
    ],
    "expressionInfos": [
        {
            "expression": "DomainName($feature, \"TYPE\") == \"TYPE1\"",
            "name": "expr1",
            "returnType": "boolean",
            "title": "Attribute Expression"
        }
    ]
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;Is there a way to control the visibility for normal popups in Field Maps?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 23:11:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/is-it-possible-to-apply-conditional-visibility-per/m-p/1265809#M5529</guid>
      <dc:creator>VincentLantaca</dc:creator>
      <dc:date>2023-03-08T23:11:37Z</dc:date>
    </item>
  </channel>
</rss>

