<?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 Combing fields to one field for table in Esri Dashboard in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/combing-fields-to-one-field-for-table-in-esri/m-p/1159453#M6088</link>
    <description>&lt;P&gt;Hello all&lt;BR /&gt;&lt;BR /&gt;I am trying to combine three fields for webservice to one field and show it on table in dashboard.&amp;nbsp;&lt;BR /&gt;I don't know if this is possible or not for now or I can use Arcade for this. I don't want to add field to data.&lt;/P&gt;</description>
    <pubDate>Wed, 30 Mar 2022 15:49:08 GMT</pubDate>
    <dc:creator>anonymous55</dc:creator>
    <dc:date>2022-03-30T15:49:08Z</dc:date>
    <item>
      <title>Combing fields to one field for table in Esri Dashboard</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/combing-fields-to-one-field-for-table-in-esri/m-p/1159453#M6088</link>
      <description>&lt;P&gt;Hello all&lt;BR /&gt;&lt;BR /&gt;I am trying to combine three fields for webservice to one field and show it on table in dashboard.&amp;nbsp;&lt;BR /&gt;I don't know if this is possible or not for now or I can use Arcade for this. I don't want to add field to data.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 15:49:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/combing-fields-to-one-field-for-table-in-esri/m-p/1159453#M6088</guid>
      <dc:creator>anonymous55</dc:creator>
      <dc:date>2022-03-30T15:49:08Z</dc:date>
    </item>
    <item>
      <title>Re: Combing fields to one field for table in Esri Dashboard</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/combing-fields-to-one-field-for-table-in-esri/m-p/1159498#M6089</link>
      <description>&lt;P&gt;This is definitely possible, but you'll need to use a Data Expression. You can see &lt;A href="https://github.com/Esri/arcade-expressions/tree/master/dashboard_data" target="_self"&gt;some examples here&lt;/A&gt; that may be helpful to you.&lt;/P&gt;&lt;P&gt;Can you elaborate on what these fields look like? When you say "combine", do you mean you want to aggregate the values in some way, or are they just text that you want to merge together?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 16:42:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/combing-fields-to-one-field-for-table-in-esri/m-p/1159498#M6089</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2022-03-30T16:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: Combing fields to one field for table in Esri Dashboard</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/combing-fields-to-one-field-for-table-in-esri/m-p/1159640#M6092</link>
      <description>&lt;P&gt;something like this in one fields:&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;Aid&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;Bid&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;Cid&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;Aid, Bid, Cid&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;x&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;y&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;z&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;x,y,z&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;all fields are string and in one table. I am using table widget in dashboard&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 20:41:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/combing-fields-to-one-field-for-table-in-esri/m-p/1159640#M6092</guid>
      <dc:creator>anonymous55</dc:creator>
      <dc:date>2022-03-30T20:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: Combing fields to one field for table in Esri Dashboard</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/combing-fields-to-one-field-for-table-in-esri/m-p/1159675#M6093</link>
      <description>&lt;P&gt;Not sure if this will work, but it's a starting point. You basically need to run through your features and concatenate those values for each, then push the features into a new FeatureSet.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// connect to layer
var fs = FeatureSetByPortalItem(
    Portal('your-portal-url'),
    'itemID of your layer',
    0, // or whatever layer index it is
    ['*'], // you can limit the incoming fields to improve perfomance if you like
    false
)

// get schema for layer
var out_fields = Schema(fs)['fields']

// add a new field to the schema to hold "merged" data
Push(
    out_fields,
    {name: 'aidbidcid', alias: 'Aid, Bid, Cid', type: 'esriFieldTypeString'}
)

// Use updated schema to create new dict
var out_dict = {
    fields: out_fields,
    geometryType: '',
    features: []
}

// Iterate over features and concatenate new field, populate output dict
for (var f in fs){
    
    // Create dictionary from existing attributes
    var atts = Dictionary(Text(f))['attributes']
    
    // Array of fields to concatenate
    var ids = [
        f['Aid'],
        f['Bid'],
        f['Cid']
    ]
    
    // add new attribute to dictionary
    atts['aidbidcid'] = Concatentate(ids, ',')
    
    // push feature to output dict
    Push(
        out_dict['features'],
        atts)
    
}

Return FeatureSet(Text(out_dict))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 21:54:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/combing-fields-to-one-field-for-table-in-esri/m-p/1159675#M6093</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2022-03-30T21:54:25Z</dc:date>
    </item>
  </channel>
</rss>

