Hello,
I'm struggling with trying to come up with a way (if there is one) to have a singular table in my Dashboard related to my Survey in 123. I added a repeat question, so that my co-worker can input multiple violations, however when I go to create the table in Dashboards it comes up as a Table and a Layer. Is there a way to combine the 2 or do I need to just remove the repeat and limit her to a 1-2 violations so that the survey isn't excessively long? I've added a bunch of screenshots to hopefully help understand what I'm trying to do. Any help would be greatly appreciated!
Thanks,
Nathan
Since the spatial layer and the related table (repeat) are two separate tables, then that means the Dashboard will also treat it as two separate layers and I don't believe there is a way to combine them within the Dashboard itself.
However, what you might be able to do is create a View Layer of the data to get it all in one view that the Dashboard can reference.
In AGOL/Portal, go to the Survey123 feature layer page and then click Create View Layer > Joined View Layer. This page will allow you to create a joined view consisting of joined tables from the feature service. I attached a screenshot of what it will look like. So, you would set your Target/Join fields and in your case, you would select a One to Many relationship since you can have multiple violations in your survey.
After you do that, it will create a feature layer view that you can use in your Dashboards.
However, one thing to keep in mind is that it will essentially "duplicate" your parent table with however many related records (violations) you have. For example, let's say you have one record in your parent table, but three associated violations. You will have three records in your view, one for each violation. The spatial/attribute data from your parent record will be "duplicated", but the violation data will be unique.
Thank you! I will give this a shot, if not it's not the end of the world having limited violations. The compliance offer can just submit a second form if need be.
Another option to look into is Data Expressions. These let you write some code in your Dashboard to query one or more data sources and manipulate the data in whatever way you want, for example joining multiple tables here, but also possibly performing aggregations in cases where you have a one-to-many relationship. They're more flexible than joined views but on the other hand you may see worse performance.
https://doc.arcgis.com/en/dashboards/latest/reference/authoring-data-expressions.htm
A main layer and a repeat sounds like the right approach. That should work for generating a feature report and a dashboard. Is the dashboard configuration the part you're struggling with? What about something like this?
"Form Submissions" = Layer 0 (I imagine this would be information about the person/perp)
"Observations" = Layer 1 (violations)
Selecting an item in the list element for Layer 0 will filter the other list element for layer 1 to only the observations(violations) relevant to that specific record. You can also embed the survey in another element to give you the ability to edit in the dashboard.