Now that it's possible to set a unique value constraint on hosted feature layer fields is there anything which I should be aware of if I start to use fields other than globalid as primary keys in relationship classes? Being able to use string and number fields as keys would make reading related tables a lot easier.
Interesting question! I'd like to see more development of relationships in AGOL in general.
However, there are some situations, like in Survey123, where parent globalID → child GUID is the only possible relationship that will function properly in the app. It wouldn't surprise me to find other cases throughout the AGOL system that assume a similar relate.
Honestly, you might post this same thing in the AGOL Ideas exchange, as it's a nice idea. I have a few use-cases that it would work for, and I'd up-vote the idea.
I've cross-posted this to ideas if you want to upvote! https://community.esri.com/t5/arcgis-online-ideas/agol-unique-constraint-for-relationship-classes/id...
Good to know about potential Survey123 issues. I don't really use it but might for my upcoming project!