<?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: Remove gaps in list from hidden fields in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/remove-gaps-in-list-from-hidden-fields/m-p/1385542#M9123</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;&amp;nbsp;you're the best, thanks!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dwold_0-1708620501099.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/95521iC6E2E9B2FF2E9650/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dwold_0-1708620501099.png" alt="dwold_0-1708620501099.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Feb 2024 16:48:39 GMT</pubDate>
    <dc:creator>dwold</dc:creator>
    <dc:date>2024-02-22T16:48:39Z</dc:date>
    <item>
      <title>Remove gaps in list from hidden fields</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/remove-gaps-in-list-from-hidden-fields/m-p/1384659#M9098</link>
      <description>&lt;P&gt;I am hiding fields that have Null values in a list. The good news is the fields are hidden, the bad news is it creates a gap or holds that empty row in the list creating large gaps between some of the data. Is there a way to remove the gaps in the list?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dwold_0-1708467338944.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/95320iE715D3F2B2B85356/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dwold_0-1708467338944.png" alt="dwold_0-1708467338944.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var org_status = IIf(IsEmpty($datapoint.built_lost_maintained), 'hidden', 'visible')
var Built = IIf(IsEmpty($datapoint.explain_built), 'hidden', 'visible')
var Lost = IIf(IsEmpty($datapoint.explain_lost), 'hidden', 'visible')
var Maintain = IIf(IsEmpty($datapoint.explain_maintained), 'hidden', 'visible')

return {
  textColor: '',
  backgroundColor: '',
  separatorColor:'',
  selectionColor: '',
  selectionTextColor: '',
   attributes: {
     org: org_status,
     explainBuilt: Built,
     explainLost: Lost,
     explainMaintain: Maintain
   }
}&lt;/LI-CODE&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;&lt;SPAN&gt;Line item template:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dwold_0-1708468175341.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/95326i47DD5A51B7E65DE8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dwold_0-1708468175341.png" alt="dwold_0-1708468175341.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2839"&gt;@KenBuja&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2024 16:07:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/remove-gaps-in-list-from-hidden-fields/m-p/1384659#M9098</guid>
      <dc:creator>dwold</dc:creator>
      <dc:date>2024-02-21T16:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: Remove gaps in list from hidden fields</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/remove-gaps-in-list-from-hidden-fields/m-p/1384954#M9104</link>
      <description>&lt;P&gt;A line item template will skip the entire line if the whole thing is blank. Since your expression just changes the visibility tag, there's still HTML in there taking up space.&lt;/P&gt;&lt;P&gt;An alternative would be to put the entire div into your expression, like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var org_status = Iif(
  IsEmpty($datapoint.built_lost_maintained),
  '',
  `&amp;lt;div&amp;gt;&amp;lt;u&amp;gt;&amp;lt;em&amp;gt;Has your organization built, lost, or maintained target capacity:&amp;lt;/em&amp;gt;&amp;lt;/u&amp;gt;${$datapoint.built_lost_maintained}&amp;lt;/div&amp;gt;`
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then in your line item template, just put {expression/org} to insert the entire HTML element.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2024 16:21:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/remove-gaps-in-list-from-hidden-fields/m-p/1384954#M9104</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2024-02-21T16:21:47Z</dc:date>
    </item>
    <item>
      <title>Re: Remove gaps in list from hidden fields</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/remove-gaps-in-list-from-hidden-fields/m-p/1384997#M9106</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;&amp;nbsp;worked great. Thank you!!!&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2024 17:16:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/remove-gaps-in-list-from-hidden-fields/m-p/1384997#M9106</guid>
      <dc:creator>dwold</dc:creator>
      <dc:date>2024-02-21T17:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: Remove gaps in list from hidden fields</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/remove-gaps-in-list-from-hidden-fields/m-p/1385499#M9119</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;&amp;nbsp;I thought I had it working but for some reason,&amp;nbsp;it still creates a gap for empty value. Do you see anything in my code I am missing?&lt;/P&gt;&lt;LI-CODE lang="c"&gt;//var phone = IIf(IsEmpty($datapoint.phone), '', `&amp;lt;div&amp;gt;&amp;lt;span style="color:#ffffbe"&amp;gt;&amp;lt;i&amp;gt;Phone: &amp;lt;/i&amp;gt;&amp;lt;/span&amp;gt;${$datapoint.Phone}&amp;lt;/div&amp;gt;`)
var family = IIf(IsEmpty($datapoint.family_of_service), '', `&amp;lt;div&amp;gt;&amp;lt;span style="color:#ffffbe"&amp;gt;&amp;lt;i&amp;gt;Family of Service: &amp;lt;/i&amp;gt;&amp;lt;/span&amp;gt;${$datapoint.family_of_service}&amp;lt;/div&amp;gt;`)
var staff = IIf(IsEmpty($datapoint.staffing_assignment), '', `&amp;lt;div&amp;gt;&amp;lt;span style="color:#ffffbe"&amp;gt;&amp;lt;i&amp;gt;How many personnel would you assign to this role: &amp;lt;/i&amp;gt;&amp;lt;/span&amp;gt;${$datapoint.staffing_assignment}&amp;lt;/div&amp;gt;`)
var staff2 = IIf(IsEmpty($datapoint.staffing_assignment_2), '', `&amp;lt;div&amp;gt;&amp;lt;span style="color:#ffffbe"&amp;gt;&amp;lt;i&amp;gt;How many are currently assigned: &amp;lt;/i&amp;gt;&amp;lt;/span&amp;gt;${$datapoint.staffing_assignment_2}&amp;lt;/div&amp;gt;`)
var staff3 = IIf(IsEmpty($datapoint.staffing_assignment_3), '', `&amp;lt;div&amp;gt;&amp;lt;span style="color:#ffffbe"&amp;gt;&amp;lt;i&amp;gt;Minimum staff to accomplish core capabilty: &amp;lt;/i&amp;gt;&amp;lt;/span&amp;gt;${$datapoint.staffing_assignment_3}&amp;lt;/div&amp;gt;`)
var org_status = IIf(IsEmpty($datapoint.built_lost_maintained), '', `&amp;lt;div&amp;gt;&amp;lt;span style="color:#ffffbe"&amp;gt;&amp;lt;i&amp;gt;Has your organization built, lost, or maintained target capacity: &amp;lt;/i&amp;gt;&amp;lt;/span&amp;gt;${$datapoint.built_lost_maintained}&amp;lt;/div&amp;gt;`)
var built = IIf(IsEmpty($datapoint.explain_built), '', `&amp;lt;div&amp;gt;&amp;lt;span style="color:#ffffbe"&amp;gt;&amp;lt;i&amp;gt;Explain built: &amp;lt;/i&amp;gt;&amp;lt;/span&amp;gt;${$datapoint.explain_built}&amp;lt;/div&amp;gt;`)
var lost = IIf(IsEmpty($datapoint.explain_lost), '', `&amp;lt;div&amp;gt;&amp;lt;span style="color:#ffffbe"&amp;gt;&amp;lt;i&amp;gt;Explain lost: &amp;lt;/i&amp;gt;&amp;lt;/span&amp;gt;${$datapoint.explain_lost}&amp;lt;/div&amp;gt;`)
var maintain = IIf(IsEmpty($datapoint.explain_maintained), '', `&amp;lt;div&amp;gt;&amp;lt;span style="color:#ffffbe"&amp;gt;&amp;lt;i&amp;gt;Explain maintained: &amp;lt;/i&amp;gt;&amp;lt;/span&amp;gt;${$datapoint.explain_maintained}&amp;lt;/div&amp;gt;`)

return {

  textColor: '',
  backgroundColor: '',
  separatorColor:'',
  selectionColor: '',
  selectionTextColor: '',
   attributes: {
     //phone,
     family,
     staff,
     staff2,
     staff3,
     org_status,
     built,
     lost,
     maintain
   }
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dwold_0-1708617707756.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/95511iCDB5745290C4A3EC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dwold_0-1708617707756.png" alt="dwold_0-1708617707756.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 16:02:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/remove-gaps-in-list-from-hidden-fields/m-p/1385499#M9119</guid>
      <dc:creator>dwold</dc:creator>
      <dc:date>2024-02-22T16:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: Remove gaps in list from hidden fields</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/remove-gaps-in-list-from-hidden-fields/m-p/1385506#M9120</link>
      <description>&lt;P&gt;Strange... When I tested something similar, I didn't see that.&lt;/P&gt;&lt;P&gt;Another way to handle this is with an Array and a Filter and a single output string using Concatenate.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var string_arr = [
  Iif(IsEmpty($datapoint.family_of_service), '', 'html string here'),
  etc,
  etc
]

// create inverse of IsEmpty function for filter
function NotEmpty(val) { return !IsEmpty(val) }

// filter your html strings
string_arr = Filter(string_arr, NotEmpty)

// return non-empty divs separated by line breaks
return Concatenate(string_arr, '&amp;lt;br&amp;gt;')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 16:11:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/remove-gaps-in-list-from-hidden-fields/m-p/1385506#M9120</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2024-02-22T16:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: Remove gaps in list from hidden fields</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/remove-gaps-in-list-from-hidden-fields/m-p/1385527#M9121</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;&amp;nbsp;thank you so much. I really appreciate the help! I also tried this with some success but instead of no gaps, it is all one single line despite using the&amp;nbsp;&lt;SPAN&gt;TextFormatting&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;NewLine. Do you see anything I could change to get separate rows for each field?&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var result = "";
//if (!IsEmpty($datapoint.Phone)) {
    //result += TextFormatting.NewLine + `&amp;lt;span style="color:#ffffbe"&amp;gt;&amp;lt;i&amp;gt;Phone: &amp;lt;/i&amp;gt;&amp;lt;/span&amp;gt;` + $datapoint.Phone;
//}
if (!IsEmpty($datapoint.staffing_assignment)) {
    result += TextFormatting.NewLine + `&amp;lt;span style="color:#ffffbe"&amp;gt;&amp;lt;i&amp;gt;How many personnel would you assign to this role: &amp;lt;/i&amp;gt;&amp;lt;/span&amp;gt;` +$datapoint.staffing_assignment;
}
if (!IsEmpty($datapoint.staffing_assignment_2)) {
    result += TextFormatting.NewLine + `&amp;lt;span style="color:#ffffbe"&amp;gt;&amp;lt;i&amp;gt;How many are currently assigned: &amp;lt;/i&amp;gt;&amp;lt;/span&amp;gt;` +$datapoint.staffing_assignment_2;
}
if (!IsEmpty($datapoint.staffing_assignment_3)) {
    result += TextFormatting.NewLine + `&amp;lt;span style="color:#ffffbe"&amp;gt;&amp;lt;i&amp;gt;Minimum staffing required to accomplish this core capability: &amp;lt;/i&amp;gt;&amp;lt;/span&amp;gt;` +$datapoint.staffing_assignment_3;
}
if (!IsEmpty($datapoint.built_lost_maintained)) {
    result += TextFormatting.NewLine + `&amp;lt;span style="color:#ffffbe"&amp;gt;&amp;lt;i&amp;gt;Has your complany built, lost, or maintained target capacity: &amp;lt;/i&amp;gt;&amp;lt;/span&amp;gt;` +$datapoint.built_lost_maintained;
}
if (!IsEmpty($datapoint.explain_built)) {
    result += TextFormatting.NewLine + `&amp;lt;span style="color:#ffffbe"&amp;gt;&amp;lt;i&amp;gt;Built Explanaition: &amp;lt;/i&amp;gt;&amp;lt;/span&amp;gt;` +$datapoint.explain_built;
}
if (!IsEmpty($datapoint.explain_lost)) {
    result += TextFormatting.NewLine + `&amp;lt;span style="color:#ffffbe"&amp;gt;&amp;lt;i&amp;gt;Lost Explanaition: &amp;lt;/i&amp;gt;&amp;lt;/span&amp;gt;` +$datapoint.explain_lost;
}
if (!IsEmpty($datapoint.explain_maintained)) {
    result += TextFormatting.NewLine + `&amp;lt;span style="color:#ffffbe"&amp;gt;&amp;lt;i&amp;gt;Maintained Explanaition: &amp;lt;/i&amp;gt;&amp;lt;/span&amp;gt;` +$datapoint.explain_maintained;
}


return {
  textColor: '',
  backgroundColor: '',
  separatorColor:'',
  selectionColor: '',
  selectionTextColor: '',
   attributes: {
     result
   }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dwold_0-1708619668703.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/95517i1529C4A6849F61E7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dwold_0-1708619668703.png" alt="dwold_0-1708619668703.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 16:35:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/remove-gaps-in-list-from-hidden-fields/m-p/1385527#M9121</guid>
      <dc:creator>dwold</dc:creator>
      <dc:date>2024-02-22T16:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: Remove gaps in list from hidden fields</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/remove-gaps-in-list-from-hidden-fields/m-p/1385530#M9122</link>
      <description>&lt;P&gt;That could work too. I honestly don't like using TextFormatting.NewLine, I don't always see it being recognized in different contexts. Try replacing that with "&amp;lt;br&amp;gt;" or "\n", see if that works?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 16:38:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/remove-gaps-in-list-from-hidden-fields/m-p/1385530#M9122</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2024-02-22T16:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: Remove gaps in list from hidden fields</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/remove-gaps-in-list-from-hidden-fields/m-p/1385542#M9123</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;&amp;nbsp;you're the best, thanks!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dwold_0-1708620501099.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/95521iC6E2E9B2FF2E9650/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dwold_0-1708620501099.png" alt="dwold_0-1708620501099.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 16:48:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/remove-gaps-in-list-from-hidden-fields/m-p/1385542#M9123</guid>
      <dc:creator>dwold</dc:creator>
      <dc:date>2024-02-22T16:48:39Z</dc:date>
    </item>
  </channel>
</rss>

