<?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: How to set up the config.json of the attribute table widget for several map services? in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-set-up-the-config-json-of-the-attribute/m-p/802937#M5434</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any idea what can be messed in my maps: if i click on: "zoom to"&lt;/P&gt;&lt;P&gt;The map is shared with a national coordinate system. And the features are points&lt;/P&gt;&lt;P&gt;TypeError: Cannot read property 'getWidth' of null&lt;BR /&gt; at Object.graphicsExtent (init.js:1952)&lt;BR /&gt; at Object.mo.graphicsExtent (zoomToUtils.js?wab_dv=2.15:138)&lt;BR /&gt; at Object.mo.zoomToFeatureSet (zoomToUtils.js?wab_dv=2.15:39)&lt;BR /&gt; at Object.selectFeatures (_FeatureTable.js?wab_dv=2.15:2395)&lt;BR /&gt; at Object._goToFeatures (_FeatureTable.js?wab_dv=2.15:2727)&lt;BR /&gt; at Object._zoomToSelected (_FeatureTable.js?wab_dv=2.15:2713)&lt;BR /&gt; at Object.zoomTo (_FeatureTable.js?wab_dv=2.15:638)&lt;BR /&gt; at Object.onClick (init.js:64)&lt;BR /&gt; at Object._onClick (init.js:393)&lt;BR /&gt; at HTMLInputElement.&amp;lt;anonymous&amp;gt; (init.js:64)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mo.graphicsExtent = function(graphicsParam, /* optional */ factor){&lt;BR /&gt; var ext = null;&lt;BR /&gt; try {&lt;BR /&gt; var graphics = graphicsParam;&lt;BR /&gt; if(graphics &amp;amp;&amp;amp;&lt;BR /&gt; graphics.length === 1 &amp;amp;&amp;amp;&lt;BR /&gt; graphics[0].geometry &amp;amp;&amp;amp;&lt;BR /&gt; graphics[0].geometry.declaredClass === "esri.geometry.Multipoint" &amp;amp;&amp;amp;&lt;BR /&gt; graphics[0].geometry.points.length === 1) {&lt;/P&gt;&lt;P&gt;var mPoint = graphics[0].geometry.points[0];&lt;BR /&gt; var point = new Point(mPoint[0], mPoint[1], graphics[0].geometry.spatialReference);&lt;BR /&gt; graphics = [new Graphic(point)];&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;if(graphics &amp;amp;&amp;amp; graphics.length === 1 &amp;amp;&amp;amp;&lt;BR /&gt; graphics[0].geometry &amp;amp;&amp;amp;&lt;BR /&gt; graphics[0].geometry.declaredClass === "esri.geometry.Point") {&lt;BR /&gt; var geometry = graphics[0].geometry;&lt;BR /&gt; ext = new Extent(geometry.x - 0.0001,&lt;BR /&gt; geometry.y - 0.0001,&lt;BR /&gt; geometry.x + 0.0001,&lt;BR /&gt; geometry.y + 0.0001,&lt;BR /&gt; geometry.spatialReference);&lt;BR /&gt; ext.isSinglePoint = true;&lt;BR /&gt; } else if(graphics &amp;amp;&amp;amp; graphics.length &amp;gt; 0){&lt;BR /&gt; ext = graphicsUtils.graphicsExtent(graphics);&lt;BR /&gt; if (ext) {&lt;BR /&gt; if(typeof factor === "number" &amp;amp;&amp;amp; factor &amp;gt; 0){&lt;BR /&gt; ext = ext.expand(factor);&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; } catch (e) {&lt;BR /&gt; console.error(e);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Feb 2020 16:00:04 GMT</pubDate>
    <dc:creator>DávidGregor</dc:creator>
    <dc:date>2020-02-14T16:00:04Z</dc:date>
    <item>
      <title>How to set up the config.json of the attribute table widget for several map services?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-set-up-the-config-json-of-the-attribute/m-p/802932#M5429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm new in the ESRI community, and also novel in editing services. We have like 40 map services with almost the same layer list. The whole service was made in WAB 2.4. But now i wanted to use the capabilities of the WAB 2.15.&lt;/P&gt;&lt;P&gt;Is it possible to mix the versions in one config file? Do i need to copy/refresh addittional files?&lt;/P&gt;&lt;P&gt;In the WAB I set up the attribute table widget for one map service, and i got a json with hardcoded layers.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What should i do to make the widget working for all the 40 map services? Should i expand the layer list with ~300 layers by hand, or there is some dynamic solution?&lt;/P&gt;&lt;P&gt;json sample:&lt;/P&gt;&lt;P&gt;{ "name": "Feature class name", "id": "map_service_1111_11", "layer": { "url": "https://domain/arcgis/rest/services/&lt;SPAN&gt;map_service&lt;/SPAN&gt;/MapServer/11" }, "show": true, "showAttachments": false, "sortField": "SORTFIELD", "isDescending": false },&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And in the main confin.json in have list for map service changer. Here is a section of that.&lt;/P&gt;&lt;P&gt;"map": {&lt;BR /&gt; "3D": false,&lt;BR /&gt; "2D": true,&lt;BR /&gt; "position": {&lt;BR /&gt; "left": 0,&lt;BR /&gt; "top": 40,&lt;BR /&gt; "right": 0,&lt;BR /&gt; "bottom": 0&lt;BR /&gt; },&lt;/P&gt;&lt;P&gt;"itemId": "2ed44b3634gdf3f5e5",&lt;BR /&gt; "mapOptions": {},&lt;BR /&gt; "id": "map",&lt;BR /&gt; "portalUrl": "https://domain.local/portal",&lt;/P&gt;&lt;P&gt;"MapService1": {&lt;BR /&gt; "itemId": "2ed4463463w4twggdxgdg"&lt;BR /&gt; },&lt;BR /&gt; "&lt;SPAN&gt;MapService2&lt;/SPAN&gt;": {&lt;BR /&gt; "itemId": "htfjhxzjzdygyr43tgxrr5h"&lt;BR /&gt; },&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Feb 2020 10:06:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-set-up-the-config-json-of-the-attribute/m-p/802932#M5429</guid>
      <dc:creator>DávidGregor</dc:creator>
      <dc:date>2020-02-13T10:06:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up the config.json of the attribute table widget for several map services?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-set-up-the-config-json-of-the-attribute/m-p/802933#M5430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dávid,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Your best bet is to start with a fresh app. There is a lot of code and even configuration files that have changed from 2.4 to 2.15. As far as configuring the layers in the&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;attribute table widget. The&amp;nbsp;&lt;SPAN&gt;attribute table widget has a settings dialog in WAB that has a nice Graphical User Interface (GUI) that allows you to make all the configurations without having to edit json directly.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Feb 2020 13:24:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-set-up-the-config-json-of-the-attribute/m-p/802933#M5430</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2020-02-13T13:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up the config.json of the attribute table widget for several map services?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-set-up-the-config-json-of-the-attribute/m-p/802934#M5431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert,&lt;/P&gt;&lt;P&gt;Thank you for your response. I rebuilt the app, and fully syncronised with the old webapp. So i built in every custom widget, and i added the mapIDs. But i still have a hardcoded attribute table widget.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe i (and my ancestor) misunderstand the whole system, and thats why they built a custom Change widget with predefined mapservice list with IDs, what uses jimu.js/mapmanager.js to change between maps inside the webapp.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I dont know how to accomplish this in WAB. And i couldn't import the custom widget succesfully. But i could deploy my new webapp to the portal. And its working.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But how would you make the the attribute table widget, to load every mapservice's attribute table? Should i write a js code, or can i solve it in json?&lt;/P&gt;&lt;P&gt;Every mapservice has the same type of feature classes, just some of them has less. But i can make a full list for a request. Do you have any idea?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2020 12:36:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-set-up-the-config-json-of-the-attribute/m-p/802934#M5431</guid>
      <dc:creator>DávidGregor</dc:creator>
      <dc:date>2020-02-14T12:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up the config.json of the attribute table widget for several map services?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-set-up-the-config-json-of-the-attribute/m-p/802935#M5432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Normally, minus any customization for adding layer or switching the map layers at runtime, the AT widget will automatically list all the layers in the map (without any configuration). You would only normally need to configure layers that you want to limit the fields shown or something.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2020 13:33:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-set-up-the-config-json-of-the-attribute/m-p/802935#M5432</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2020-02-14T13:33:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up the config.json of the attribute table widget for several map services?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-set-up-the-config-json-of-the-attribute/m-p/802936#M5433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, now a realised my mistake. Thank that you pointed on it. shouldn't have given json parameters(set up the AT widget). Is there any json option&amp;nbsp;to query for layers to show (in my situation to now show).?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2020 15:50:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-set-up-the-config-json-of-the-attribute/m-p/802936#M5433</guid>
      <dc:creator>DávidGregor</dc:creator>
      <dc:date>2020-02-14T15:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up the config.json of the attribute table widget for several map services?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-set-up-the-config-json-of-the-attribute/m-p/802937#M5434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any idea what can be messed in my maps: if i click on: "zoom to"&lt;/P&gt;&lt;P&gt;The map is shared with a national coordinate system. And the features are points&lt;/P&gt;&lt;P&gt;TypeError: Cannot read property 'getWidth' of null&lt;BR /&gt; at Object.graphicsExtent (init.js:1952)&lt;BR /&gt; at Object.mo.graphicsExtent (zoomToUtils.js?wab_dv=2.15:138)&lt;BR /&gt; at Object.mo.zoomToFeatureSet (zoomToUtils.js?wab_dv=2.15:39)&lt;BR /&gt; at Object.selectFeatures (_FeatureTable.js?wab_dv=2.15:2395)&lt;BR /&gt; at Object._goToFeatures (_FeatureTable.js?wab_dv=2.15:2727)&lt;BR /&gt; at Object._zoomToSelected (_FeatureTable.js?wab_dv=2.15:2713)&lt;BR /&gt; at Object.zoomTo (_FeatureTable.js?wab_dv=2.15:638)&lt;BR /&gt; at Object.onClick (init.js:64)&lt;BR /&gt; at Object._onClick (init.js:393)&lt;BR /&gt; at HTMLInputElement.&amp;lt;anonymous&amp;gt; (init.js:64)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mo.graphicsExtent = function(graphicsParam, /* optional */ factor){&lt;BR /&gt; var ext = null;&lt;BR /&gt; try {&lt;BR /&gt; var graphics = graphicsParam;&lt;BR /&gt; if(graphics &amp;amp;&amp;amp;&lt;BR /&gt; graphics.length === 1 &amp;amp;&amp;amp;&lt;BR /&gt; graphics[0].geometry &amp;amp;&amp;amp;&lt;BR /&gt; graphics[0].geometry.declaredClass === "esri.geometry.Multipoint" &amp;amp;&amp;amp;&lt;BR /&gt; graphics[0].geometry.points.length === 1) {&lt;/P&gt;&lt;P&gt;var mPoint = graphics[0].geometry.points[0];&lt;BR /&gt; var point = new Point(mPoint[0], mPoint[1], graphics[0].geometry.spatialReference);&lt;BR /&gt; graphics = [new Graphic(point)];&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;if(graphics &amp;amp;&amp;amp; graphics.length === 1 &amp;amp;&amp;amp;&lt;BR /&gt; graphics[0].geometry &amp;amp;&amp;amp;&lt;BR /&gt; graphics[0].geometry.declaredClass === "esri.geometry.Point") {&lt;BR /&gt; var geometry = graphics[0].geometry;&lt;BR /&gt; ext = new Extent(geometry.x - 0.0001,&lt;BR /&gt; geometry.y - 0.0001,&lt;BR /&gt; geometry.x + 0.0001,&lt;BR /&gt; geometry.y + 0.0001,&lt;BR /&gt; geometry.spatialReference);&lt;BR /&gt; ext.isSinglePoint = true;&lt;BR /&gt; } else if(graphics &amp;amp;&amp;amp; graphics.length &amp;gt; 0){&lt;BR /&gt; ext = graphicsUtils.graphicsExtent(graphics);&lt;BR /&gt; if (ext) {&lt;BR /&gt; if(typeof factor === "number" &amp;amp;&amp;amp; factor &amp;gt; 0){&lt;BR /&gt; ext = ext.expand(factor);&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; } catch (e) {&lt;BR /&gt; console.error(e);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2020 16:00:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-set-up-the-config-json-of-the-attribute/m-p/802937#M5434</guid>
      <dc:creator>DávidGregor</dc:creator>
      <dc:date>2020-02-14T16:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up the config.json of the attribute table widget for several map services?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-set-up-the-config-json-of-the-attribute/m-p/802938#M5435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In a normal scenario when a new layer is added to the map (say using the Add Data widget) then the layer will not show in the AT widget until choose the "View in attribute table" option from the Layer List widgets layer menu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2020 16:01:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-set-up-the-config-json-of-the-attribute/m-p/802938#M5435</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2020-02-14T16:01:28Z</dc:date>
    </item>
  </channel>
</rss>

