Hello,
I have an operations dashboard that pulls COVID data from our governmental source. The REST services the government provides has almost all of its data fields as strings... Age field.. date field.. count fields... this is making it very difficult to create charts from the data on my dashboard. For instance, if i try and show cases by age the ages are listed in the incorrect order because they are strings. Is there any way to remedy this while still pulling the live data from our government source?
Take a look here: Arcade Expression Converting Text to Date
You might be able to figure out a way with arcade in the newer beta dashboards
Hey Joe, thanks for the response.
Right now i dont think arcade expressions set within a map are available to use as a data source within Dashboards. I do know that the new dashboards support arcade expressions... but they currently don't support data tables (layers with no geometry), which the layer in question is.
I just did a quick search looking for what you are up against; arcade is still a mystery to me but it seems like there should be a way to treat a text field as numeric. It's a fairly common consideration in most languages. I've never used the beta dashboards; personally, I think everything is beta, but that's another discussion.
See if you can add the rest service as an item in your AGOL account and use it for the the data source in your dashboard. I did that last week, for a mapless dashboard so even though the rest service happens to be a feature layer, I'm only 'using' the tabular data for my dashboard.
Hi Joe, Doing that does not work since Dashboard (non-beta) will allow you to filter the strings correctly, but the string field we need to show will not chart using the government REST service's Date field in the Series drop-down list, nor will any string appear in any drop-down that is limited to numeric fields only (which is normal). Thus, without an efficient way to convert string to numeric within the Dashboard non-beta it does not seem possible at this time. Hopefully, their new Dashboard will allow both tables and Arcade to be used together as it is a crucial combination. Wondering if there is a workaround using other AGO apps that can be used as a hosted layer in our AGO content, which allows programming the table service to convert strings to numerics on the fly, which can then be used as a data source in the Dashboard.
I didn't guarantee it would. Sounds like the data source you are using doesn't lend itself well to ArcGIS dashboards.
No worries, Joe! Thank you for some troubleshooting advice. I am more spelling it out in hopes that others running into the same issue might comment.