Hello,
I am relatively new to the python API. There is something I am not understanding about featurelayercollections (flc). In AGOL, I have a feature service with a point layer and a related table. This is feature service is an flc:
<Item title:"123" type:Feature Layer Collection owner:123>
According to the documentation, I should have access to properties such as "relationships" or "manager". I wanted to use the flc manager to add a layer to the service but running the code:
Solved! Go to Solution.
Based on the error and other provided information, it seems you are working with a FeatureCollection Item and not a FeatureCollection object.
Try doing this:
from arcgis.features import FeatureLayerCollection
flc = FeatureLayerCollection.fromitem(flc_item)
where "flc_item" is what you are currently working with
Based on the error and other provided information, it seems you are working with a FeatureCollection Item and not a FeatureCollection object.
Try doing this:
from arcgis.features import FeatureLayerCollection
flc = FeatureLayerCollection.fromitem(flc_item)
where "flc_item" is what you are currently working with
Thank you for the clarification Earl! That was the issue. A few things I noticed:
flc.manager.layers - Returns related table as part of the layers list.
flc.manager.tables - Does not recognize related table, returns an empty list.
flc.relationships - returns an empty list. I am not familiar with the "supportsRelationshipsResource" property...
Thank you.