Hey everyone. I'm working on a project that heavily relies on related tables and spans nearly two decades of data. I know that you have much less flexibility once you've already published those related tables within a GDB in ArcMap into ArcGIS Online (we are really only working within AGOL now).
I'm a bit confused about the whole reordering related tables records issue -- so for one thing, we are not able to reorder the way related tables are sorted (they are based on when the relationship was created), which I understand.
However, what about the records within the related tables? How are they automatically sorted? They don't seem to be sorted by the first column, and I can't seem to change it. Within each related table there is a field that identifies a site location, and with each site location there are a bunch of observations with time stamps. I'm trying to order the records based on time stamps so that each site location shows the observations in chronological order, however that's not happening (i.e. one site shows three observations as: 10/31/19, 10/12/19, 10/26/19, which you can see is not in chronological order). Can someone please help me understand this issue and potentially how to fix it? Thank you.
Hi Tiffany Wu,
Not sure if you have found the answer to this yet, but you would control this in the parent feature layer's Configure Pop-up dialog. In the visualization tab or web map, open the parent layer's configure pop up dialog and scroll to the bottom to the related data section > select Sort Order. Then you can display the related data in chronological order.
Hope this helps,
Hi Peter! No I hadn't found a solution, and I think this should work -- thank you so much! Do you also have a solution for reordering the related tables themselves, or is that not possible to do once relationship classes have been created?
Sure! I think that would be a useful feature.
So an update... I tried it out first on the parent hosted feature layer. What I did from "Sort Options" was I changed the field to "Date" and sort order to "Descending", to show more recent records first. I changed one field to test it out and when I went back to the web app where the related records are displayed in the pop-up, no changes seemed to stick. Then I went to the web map and tried those changes, still didn't stick.
Then, on the web map, I decided to just apply those changes to all the related tables (~15 of them) and saved the map. I went to the web app, no changes stuck. I went back to the web map and looked at the "Sort Options" again, and most of them had reverted back, so it showed "ObjectID" for the field and "None" for sort order, except for the top one. It was really strange. Is that supposed to happen?
I also checked the related tables' attribute tables, and I sorted the same Date field in descending order, and it worked, so I know that the problem isn't based on the data type or entries or anything like that. It's just nothing is sticking! Do you have any insights on why this might be happening?
Hi Tiffany Wu, I haven't been able to reproduce this issue where the order doesn't stick, but my next suggestion would be to try the same sort order on the Item Details > Visualization tab of the layer, then save the layer, in the case that your layer has been added directly to the web app. Which web app are you working with? That said, from what you've described the behavior you are experiencing is not expected. I've sent you a direct message so we can get a tech support case created and troubleshoot the issue further. Thanks!