Relates + and workflow from ArcPro to Online

1302
9
01-08-2018 07:02 AM
ErichPurpur1
New Contributor

Hi-

I'm struggling here. My question is 2 parts:

I have a table (attached to this post) with usage data from a building on a college campus. There are 4 floors in the building. Each floor is broken into zones, where headcounts are taken at various times on various days.

My first problem- I have all my data in a table and I have layer files for the 4 floors in the building with their corresponding zones (zone 1, zone 2, etc). It seems I should create a relation between this table and each floor layer, right?

Second problem- Now, I'm trying to figure out a workflow to migrate this into ArcGIS online. Ideally the WebApp would do the following: Allow users, via some kind of drop down or radio button menu, to select a floor, a date, a time, and another variable to display. So for example: User chooses floor 1, October 19th, 10am, total headcount.

I'm not looking for step by step instructions but some guidance would be much appreciated.  

Thank you,

Erich

0 Kudos
9 Replies
XanderBakker
Esri Esteemed Contributor

You can relate the featureclass with the zones and floors to the data stored in the csv, however you will need to create an ID in the CSV that corresponds to the features (for instance concatenate the floor and the zone into a single additional ID). You could instead of using relate, use a relationshipclass with a 1:n cardinality. See: Create Relationship Class—Help | ArcGIS Desktop (this will require a Standard or Advanced license level).

You can configure an app using the Web AppBuilder (see: What is Web AppBuilder for ArcGIS?—Web AppBuilder for ArcGIS | ArcGIS )  and configure the Filter widget—Web AppBuilder for ArcGIS | ArcGIS 

0 Kudos
ErichPurpur1
New Contributor

Thanks for the input Xander.  However, I'm still stuck.

I created a concatenated field for floors + zones (ex: 1.2, for floor 1 zone 2) both in the table and in my layers.

I'm unsure how to continue in ArcGIS online.  I created a relate, AND a relationship class between my table and my floor layers. 

In ArcGIS Online I've imported each individual floor layer as a feature layer, and the table as a .csv.  It seems like the relate does not transfer. Also, I am unable to import the relationship class into ArcGIS Online. 

Thank you for any suggestions.

-Erich

0 Kudos
XanderBakker
Esri Esteemed Contributor

For a relationshipclass you should have both the fc and the table in the same file geodatabase. So import the csv into the fgdb as a table. Then publish the data out to ArcGIS Online (the relationshipclass will persist).

ErichPurpur1
New Contributor

I seem to not understand how the relationship class persists when publishing a feature class in ArcGIS Online. I have my layers and table in the same geodatabase. I created a relationship class between the table and each of the layers. I then exported each layer as a shapefile, zipped the shapefile, and published them as a feature class in ArcGIS Online. I also saved the table as a .csv, and published it as a table in ArcGIS Online.

It seems to me something is being lost in the steps when I save each layer, zip them, and publish them online.

0 Kudos
XanderBakker
Esri Esteemed Contributor

A shapefile cannot participate in a relationshipclass so it will not persist when you convert to shapefile and upload the data to ArcGIS Online. You will need to publish (share web layer) directly from ArcGIS Pro: Introduction to sharing web layers—ArcGIS Pro | ArcGIS Desktop 

0 Kudos
ErichPurpur1
New Contributor

Ahh, yes that was my problem.  Thank you.

Now onto my 2nd issue, setting up the web app using Webapp builder. I've been playing with this now and reading documentation. When setting up the filter widget, the problem is the data I want to filter by is contained in the table which is related to each feature layer. And yes, I've verified the relationship class is maintained in my web map. 

When creating the filter widget, I'm only able to filter by data contained in the feature layer's table. Later, once the webapp is launched, I can see data in the related table.  Is it possible to configure the widget to filter by the data in the related table?

0 Kudos
XanderBakker
Esri Esteemed Contributor

For that I think you would need to structure your data differently, like replicating the geometry for every record in your related table (so flatten the data and not maintain a relationship with the table).  

0 Kudos
ErichPurpur1
New Contributor

I see, that is what I feared all along. No problem, I will see what I can do.  Thanks for all your help.

0 Kudos
XanderBakker
Esri Esteemed Contributor

You may be interested in this how to document: How To: Create a one-to-many join in ArcMap 

0 Kudos