Select to view content in your preferred language

Append_management string equivalent for a boolean field

3256
4
08-10-2015 08:32 AM
AllanAxon
Deactivated User

I am using a python script we already have to import data from Excel to a geodatabase table. The field is now a boolean in the table and I'm using: listed \"listed\" true true false 50 Text 0 0 ,First,#,c:\\temp\\agol.csv,listed,-1,-1;

The error I get is: "ExecuteError: ERROR 001156: Failed on input OID -1, could not write value 'False' to output field listed

I think I need to change my field mapping to: listed \"listed\" true true false 50 Boolean 0 0 ,First,#,c:\\temp\\agol.csv,listed,-1,-1; but that still gives the same error. What are the valid field types that go in this position of a field mapping string?

Thanks,

Allan

0 Kudos
4 Replies
DarrenWiens2
MVP Honored Contributor

Is the data type of your field truly "Boolean" or perhaps a 1-digit integer or a text field? I don't see Boolean listed as a valid ArcGIS data type.

0 Kudos
AllanAxon
Deactivated User

My data type in SQLServer (destination) is bit, not null. In the Excel sheet (origin) it's either "TRUE" or "FALSE"

0 Kudos
AllanAxon
Deactivated User

The field type in SQLServer is a bit field. I got by this problem by converting all the False values in the spreadsheet to 0 and the Trues to 1 and reading them as text. Will have to look at the design of the table for a long term fix.

0 Kudos