Unfortunately, there's no way that I'm aware of to add a relationship across two different hosted feature services. Even if you had the table added to the same service, adding the relationship is still tricky, though some users claim to have done it by editing the JSON of the service layers.
A relationship in AGOL looks like this:
"relationships": [
{
"keyField": "name",
"role": "esriRelRoleOrigin",
"composite": false,
"name": "sanitary_retired",
"relatedTableId": 3,
"id": 0,
"cardinality": "esriRelCardinalityOneToMany"
}
]
There's simply nowhere in the relationship definition to look for an outside service; it has to be in the same service.
There are plenty of posts on here about "can I add a layer to a service without republishing?", and some interesting suggestions in response to them. In my experience however, the only reliable way to add or remove a layer from an existing service is to republish.
Any chance you could schedule something like this to happen overnight?
- Pause editing on the service
- Download entire service to local files in ArcGIS Pro
- Make sure inspection table is added to the layer list
- Republish and overwrite
If you add a service, make sure you only add it to the bottom of the list, otherwise your layer index will get messed up, and existing maps using the service will probably edit the wrong layers.
- Josh Carlson
Kendall County GIS