Setting a <null> Coded value in My Domain

1927
5
08-29-2016 02:57 PM
DeannaBurke
New Contributor II

Hello,

I'm creating a large number of coded domains. I have what appears to be an issue for my users, however. They are collecting data about point features. There is a chance they could calculate the value of a field they didn't intend to. When we have coded values set, they can't set the value back to null. Is there a way I can add null to a coded domain?

Thank you,

Deanna

0 Kudos
5 Replies
JoeBorgione
MVP Esteemed Contributor

I'm not python expert by any means, perhaps we'll hear from those with much more skill than I ( dkwiensDan_Patterson‌ ) but <null> is handled as None.  Why are you considering this as a python issue?  It's real easy to calculate back to <null> in VB; in the field calculator, YourField = Null.  I've never really figured out how to do that in python, but surely that doesn't mean it can't be done. 

As far as a domain value, I think if you allow <null> values it will appear in the pull-down option.

can't wait to retire....
0 Kudos
DeannaBurke
New Contributor II

I don't think I was clear. I'm sorry. I am creating this feature class in Python and will need to recreate it more than once. The true issue is that the null value is not an option when this feature class is used in a mobile map service for ArcGIS for Windows Mobile. The fields are nullable, but, null doesn't show as an option in the pick list once a domain is applied.

0 Kudos
JoeBorgione
MVP Esteemed Contributor

Sorry, but you've lost me: 

Is there a way I can add null to a coded domain...

The true issue is that the null value is not an option...

Here is a screen capture of a coded domain I have in one of my feature classes:

can't wait to retire....
DeannaBurke
New Contributor II

It may be specific to ArcGIS Mobile. Here's what the options are within the application:

Null is not an option, so, in order to save this record, the user must choose on of the coded domain values. Thank you for your input.

0 Kudos
RebeccaStrauch__GISP
MVP Esteemed Contributor

In you mobile app, can you set a domain value/option to "select one" or "not applicable" or some other value that shows the user that if they don't select an option, that is ok.  Then once back in the office, run you script to Null them out?  I did something similar last week (i.e. set values back to null)...this is the note I made for myself

None   if using PYTHON_93  or
Null   if using VB .....not quotes or spaces

similar to what Joe mentioned.  My need was a little different

Just as a old-school fyi - I used to have a lot of "999" codes in the data formats that was a holder for some unknown value, "null" on a numeric field that needed to be a null, and not a zero.  Sometimes for new technology like some of the mobile apps you need to find workarounds until they are put in place. 

 I would suggest looking a tthe many ideas re: null values and voting up any that are similar to yours

https://community.esri.com/search.jspa?q=null+domain+values&place=%2Fplaces%2F478947&depth=ALL 

for example    although that is andrid, there may be one for Windows Mobile (i didn't do thorough search) and if you don't find one, add a comments to one or start a new idea.  If you are having issues, others may too.  (btw, I do not use Windows Mobile at this time).