Calculate null values on a feature layer
I'm working on a workflow to let users nullify values on a feature layer. It's for an Adopt a Fire Hydrant app where people can enter their contact info. This workflow is for if they want to abandon a hydrant and delete their contact info (i.e. null out the values for that hydrant's contact attributes). The workflow process is like this:
- User clicks a link in the pop-up to abandon the hydrant (RunWorkflowWithArguments)
- QueryTask activity to select the hydrant (WHERE "OBJECTID = InputArgument")
- Assign activity for each attribute value to null (resultFeatureSet.Features(0).Attributes("FieldName") = null)
- UpdateFeatures activity to commit the changes
I'm having trouble figuring the syntax need to calculate the field value back to null. I've already tried setting the value to "null", "Null", "<null>", and nothing. None of them works. The first two set the field value to the literal string, and the second two don't do anything.
Does anyone know what the proper syntax or value is to calculate field values to null in a workflow?
Thanks in advance for any help!
-
John,
As far as I know, you CAN'T set field value on the feature NULL.
I think AGS smartly (or over-smartly) ignore it.
So you may set "" (String.Empty) if it is TEXT type even though NULL and String.Empty is different meaning.
Worsely, if the field type is non-Text type, AGS looks set as the default value like 0 for Number, and defautl dataTime for Date etc.
That is what I found while I was working before.
0 -
Thanks for the detailed info. Bummer that it doesn't work, but luckily it's not a showstopper for my workflow.
I'm probably just going to set the values to null. I can always clean it up later in ArcGIS Desktop or with a Python script.
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
2 Kommentare