How to add features to referenced feature layer

752
3
Jump to solution
08-03-2021 07:35 AM
GeoHawaii
New Contributor II

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
New Contributor II

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

0 Kudos