Select to view content in your preferred language

Does editing DataForm validate range domain values?

608
5
05-21-2010 02:46 AM
deleted-user-pYdfRjvSAbTJ
Deactivated User
Hello,
I'm experiencing that editing DataForm in API 2.0 doesn't validate values when applying modifications.
If I explore the feature service I use with ArcGIS Server rest website, I can correctly see the information about range value domain applied to the numeric field I try to modify.
But when I input a wrong value outside the range of the domain in the DataForm, and then click to Apply button, nothing happens and the modification completes without errors.
I don't expect this behavior: I think that the DataForm should alert for the wrong value, in the same way it does when I try to input for example a string instead of a number (in this case it's clear that the value is wrong because a numeric field cannot accept a text).
Can someone confirm all this?
0 Kudos
5 Replies
AliMirzabeigi
Emerging Contributor
Hello Roberto,

I was not able to reproduce this issue with the v2.0 Beta. Could you please provide more information and/or maybe the service you are using that I could hit in my tests?

Thank you,
Ali Mirzabeigi
0 Kudos
BingZhu
Deactivated User
Hi robymes,

Would you mind to share your solution of using DataForm to edit attribute table that has domain fields?

Thanks in advance!
0 Kudos
JenniferNery
Esri Regular Contributor
This SDK sample uses FeatureDataForm http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#ToolkitFeatureDataForm. When you click a feature notice the attribute "Status" is a CodedValueDomain.
0 Kudos
BingZhu
Deactivated User
I've been studying that sample. Two questions:

1. Is it possible to customize the dataform?

2. Is the dataform only used for modifying data? How about add and delete data?

Thanks!
0 Kudos
AliMirzabeigi
Emerging Contributor
1. Yes, you can modify the default template of the FeatureDataForm. There are also additional templates named as ComboBoxStyle, DatePickerStyle, LabelStyle, and TextBoxStyle to let developers change the look and feel of its content.
2. You can use EditorWidget (see editing sample here) or TemplatePicker (SDK sample here) controls to add/delete data in your feature layer. Please note that you need to set their "ShowAttributesOnAdd" property to TRUE to automatically popup the FeatureDataForm for user to set the attributes for the newly added features.
0 Kudos