How can I display a hosted feature layer's attribute table on an Open Data site page?

06-19-2019 03:27 PM
New Contributor II

I need to display a hosted feature layer's attribute table in an Open Data site (ArcGIS Hub). Can someone please tell me the best way to do this?

To explain, we have an open data site that displays a road closures map, and beneath the map, we want to display a list of the road closures that are shown on the map -- hence, the need to display the hosted feature layer's attribute table.

Here's the site, so far:

I have tried using the FeatureTable dijit (Javascript from the ArcGIS API for Javascript) ...

Here's what I have discovered so far:

  • Using this code directly in an ArcGIS Hub open data site doesn't work, for some reason. The site builder seems to recognize it, but then it doesn't render it when in view mode.
  • The only way I can get it to display in an open data site is by using the iframe widget.
    • This requires me to host the Javascript on an external html file on our local server.
    • This solution is ultimately not going to work for my organization's needs. Since this is part of a disaster response system, we need the entire application to be hosted on the cloud.
  • I have also discovered that the column ordering property the FeatureTable dijit function doesn't work.
    • When you re-order the array that lists the column order, the columns are supposed to re-order. But they don't. (I have already shown this to ESRI's SDK Team, and they are looking into it).

Any further input would be greatly appreciated ... Thank you!


0 Kudos
2 Replies
Esri Contributor

Hi Lee!

Would it be feasible to add the Attribute Table widget to your web app? You should be able to configure the widget to open automatically when the app opens. I put together a quick test app and threw it into my own test Hub site -- here's what it looks like:

Here's the button I clicked to get the attribute table to open automatically in Web AppBuilder:

Hope this helps!

- Sydney

New Contributor II

Thanks for the reply, Sydney. Yep - I love that widget! We use it in most of our web apps.

... Unfortunately though, our Web Team has deemed that it is not ADA compliant, whereas the table produced using the Javascript API is. Also, embedding an attribute table directly on a web page offers a qualitatively different user experience than having it in a web application. In this situation, we really do need to embed the table.

0 Kudos