Creating a new hosted feature layer with dynamic dataset (live data)

608
4
Jump to solution
11-16-2020 05:18 PM
JulietK
Occasional Contributor

Hi, I am looking for ways to join related feature classes across two tables (repeats), which would produce a new hosted feature layer with live data (dataset updates automatically as new data are submitted via Survey123 form). 

I've tried the join tables function via Web Map - Join Features. But this only produces a static feature layer, which does not update with new data. I see that relate tables function apparently solves this, but from what I can see it seems to be primarily for Web Map 'pop ups' use, and would not produce a new layer containing data from both tables. 

Any info would be greatly appreciated!

0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Regular Contributor

Unfortunately, it doesn't seem like it would be possible to do a one-to-one attribute-based join with the data as it's structured. The best you could do in a dashboard is to chart each item (time spent and birds found) separately.

With some custom coding, you might be able to get this to work, but that may be more effort than a single chart is worth.

Is there a reason the Bird Found repeat is separate? Could you just allow those fields to be null in the event that no bird is found? I'm thinking a more manageable solution to this could be simply re-working the data. Publishing a Survey from an existing table is pretty easy with Survey123 Connect, and is my go-to method when I want to get the schema just right before creating the survey.

- Josh Carlson
Kendall County GIS

View solution in original post

4 Replies
jcarlson
MVP Regular Contributor

It is possible to create a hosted view of the resulting join. However, per the Join Features documentation (found here)




You can create a hosted feature layer view from the analysis results if all of the following conditions are met:

  • You are the owner of both layers.
  • Both layers are hosted feature layers.
  • You are performing an attribute join.

 

The following additional limitations exist for hosted feature layer views:

  • Creating results as a hosted feature layer view is only available for attribute joins.
  • When storing results as a hosted feature layer view, Use current map extent is unavailable.

Could you elaborate a bit about how you intend to use the resulting join, and what the input data looks like? There may be alternative solutions, but it's hard to say with limited information.

- Josh Carlson
Kendall County GIS
0 Kudos
JulietK
Occasional Contributor

Hi Josh, thank you for your reply!

I did create a hosted feature layer using the Join Feature; however, the issue I ran into was that the resulting hosted feature layer is unable to automatically update to display new data (from the two separate tables, which receive data from active Survey123 form). 

I am wanting to find a way to produce the same result as the above, but a feature layer containing a joined dataset that gets automatically updated when the two source tables receive new data. The purpose of the new feature layer is to be used in ArcGIS dashboard for creating charts containing data from the two different source tables (sublayers). 

I've added a sample data - the screenshots show one table named 'Time Searched' (a repeat), and another table named 'Bird found' (also a repeat). These are dataset outputs directly resulting from a Survey123 form. The form respondents are are able to either enter data for Time Searched, or Bird Found, depending on a selection at the beginning of the survey - bird isnt found every search period, so Time Searched data is input separately to Bird Found. 

In a Dashboard displaying the resulting data, I need to create a chart that shows the sum of minutes searched and the number of birds found by each person. In the current format this is not possible to create, as the 'Minutes searched' is in the Time Searched sublayer while the birds found data is in the Bird Found sublayer, and Dashboard only allows selection of one sublayer. So I would like to join the features in these tables together into one feature layer, which would show up as one layer containing data from both tables, to select in the Dashboard. However, the new feature layer needs to be able to update automatically, so that the Dashboard shows real-time live information. 

0 Kudos
jcarlson
MVP Regular Contributor

Unfortunately, it doesn't seem like it would be possible to do a one-to-one attribute-based join with the data as it's structured. The best you could do in a dashboard is to chart each item (time spent and birds found) separately.

With some custom coding, you might be able to get this to work, but that may be more effort than a single chart is worth.

Is there a reason the Bird Found repeat is separate? Could you just allow those fields to be null in the event that no bird is found? I'm thinking a more manageable solution to this could be simply re-working the data. Publishing a Survey from an existing table is pretty easy with Survey123 Connect, and is my go-to method when I want to get the schema just right before creating the survey.

- Josh Carlson
Kendall County GIS

View solution in original post

JulietK
Occasional Contributor

In terms of the technicalities of the join features, I managed to ensure the resulting feature layer contained all data including any repeats subsequent to the first entry, by selecting the parentglobalID as the only field to match, and selecting the one-to-many for the join operation. I've confirmed that this produces the type of data table/layer that I need which collates all required data fields together, the only issue is that the joined feature layer is unable to automatically update live data. 

I am using the Survey123 Connect, and have not published the draft survey yet as I am making sure everything works the way I need them to prior to the publish 🙂 If it is not possible to join/relate features to create a feature layer which allows automatic updates, I plan to reconsider the current survey design.

The one chart I am wanting to make is just one example of the many charts I am needing to create using fields from both tables unfortunately - since there are so many fields between the two tables I am needing to link/relate together, I decided it would make more sense for me to try join features rather than making minor tweaks in the survey design. Re: your idea of putting everything into one repeat and leaving the fields relevant to the non-selected entry type to be null - this seems like a great idea which I have not thought of, and I'm guessing this would probably produce the same data table appearance as the joined feature layer. Thank you, I will test this!

0 Kudos