Skip to content

Unable to add relationship between feature layer and table in Portal #2356

@carloniluca91

Description

@carloniluca91

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

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions