Unable to add relationship between feature layer and table in Portal
- Dominant language
- Python
- Stars
- 2.2k
- Forks
- 1.2k
- Avg merge
- 2h 40m
- Merged PRs (30d)
- 2
Description
**Describe the bug**
Hi,
i'm using arcgis version 2.4.1.1 and authenticating to an on-premise portal. By following the example in this post, https://community.esri.com/t5/arcgis-api-for-python-blog/add-table-from-hosted-service-to-another-and/bc-p/1647390, i can't add relationships between the feature layer and the table.
To be precise, the statement causing the program to fail is
```python
lyr.manager.add_to_definition({"relationships": [lyr_rel_dict]})
```
The error message is poor
```
Exception: {'code': 500, 'message': "Field 'relationships' cannot be updated.", 'details': []}
```
Unfortunately, none of the comments within the post helps
Platform
- OS: Windows 11
- Python API Version: 2.4.1.1
- Python version: 3.12.11
Contributor guide
Assessment
This issue has not been assessed yet.