Which Field Type for Boolean

5046
4
Jump to solution
04-02-2019 06:15 AM
by Anonymous User
Not applicable

Greetings, I really need to use a boolean field type but it looks like one is not listed in the documentation. 

https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Field.html#type

How do I type a field to hold a true false value? 

Thanks, Tyler 

Tags (2)
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Tyler,

   A boolean value is 1 or 0 so a integer field is best for this.

View solution in original post

4 Replies
RobertScheitlin__GISP
MVP Emeritus

Tyler,

   A boolean value is 1 or 0 so a integer field is best for this.

by Anonymous User
Not applicable

Thanks for the info Robert.

0 Kudos
chuckfrank
Occasional Contributor

I have the same question, but neither "string" or "integer" are working.  I'm creating a feature layer from client side graphics.  The data is json. 

I'm getting and error: "Value true is not a valid value for the field type - field: IsTriggerGauge, type: esriFieldTypeString, nullable: true"

Is there anything else I can try?

RobertScheitlin__GISP
MVP Emeritus

Chuck,

  I would have to see your code.

0 Kudos