Select to view content in your preferred language

How to add features to referenced feature layer

1016
3
Jump to solution
08-03-2021 07:35 AM
GeoHawaii
Emerging Contributor

Hey All,

I have a referenced feature layer and a hosted feature layer. I need to add or copy the features from the hosted feature layer to the referenced feature layer.
I currently have a script that copies features from one hosted feature layer to another hosted feature layer. If I now use a referenced feature layer I get the following error message: TypeError: unsupported operand type (s) for +: 'FeatureLayer' and 'str'

Is it not possible at the moment?
I use the edit_features function for this

0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

Looking at the error, is FeatureLayer an object?  They both need to be strings to be concatenated by the + so make sure both variables are strings.

View solution in original post

0 Kudos
3 Replies
jcarlson
MVP Esteemed Contributor

Sharing your code would help others identify what the problem is. A TypeError may be a very simple fix.

Have you gotten this process to work in the past, or are you still developing it?

- Josh Carlson
Kendall County GIS
0 Kudos
by Anonymous User
Not applicable

Looking at the error, is FeatureLayer an object?  They both need to be strings to be concatenated by the + so make sure both variables are strings.

0 Kudos
GeoHawaii
Emerging Contributor

Yes thank you, this was my problem. The referenced feature layer variable was not a str

0 Kudos