I have found that none of the following combinations of configurations sets the field to Null:
Expression : IIF(1 = 1 , Null, Null) => this results in an empty string instead of Null. Log file looks fine with no errors
Log File :
Trying: EXPRESSION Checking to verify there is a field to store the expressionExpression to be eval: iif(1 = 1,Null,Null) Setting Value to: Finished: EXPRESSION
-----
Expression : IIF(1 = 1 , <Null>,<Null>) => this does nothing as it is considered syntactically incorrect as per log file:
Trying: EXPRESSION Checking to verify there is a field to store the expressionExpression to be eval: iif(1 = 1,<Null>,<Null>) ERROR: evaluating the expression for feature in AA_VOne with OID of 1 Syntax error Finished: EXPRESSION
Expression : IIF(1 = 1 , "", "") => this results in an empty string instead of Null which doesn't align with the online reference in my previous post above. Log file looks fine with no errors:
Trying: EXPRESSION
Checking to verify there is a field to store the expressionExpression to be eval: iif(1 = 1,"","") Setting Value to: Finished: EXPRESSION
----
Expression : IIF(1 = 1 , vbNull, vbNull) => this results in the value of the vbNull which is 1 string instead of Null. Log file looks fine with no errors
Trying: EXPRESSION Checking to verify there is a field to store the expressionExpression to be eval: iif(1 = 1,vbNull,vbNull) Setting Value to: 1 Finished: EXPRESSION
Checking to verify there is a field to store the expressionExpression to be eval: <Null> ERROR: evaluating the expression for feature in AA_VOne with OID of 1 Syntax error Finished: EXPRESSION
What is the log file reporting, reviewing the code <Null> should work, try without the " " around it
Hi Michael,
I know this is an old post , but is it possible in the current version of Attribute Assistant to set string or numeric fields to Null, if yes then how we can simply set the field to Null ?
The only reference I could find and it didn't work with me was below, I have tried VBNull and Null in the IIF below but also didn't work :
</CODE><CODE>Attribute operations - Attribute Assistant | ArcGIS Solutions
</CODE><CODE>
To set values as null, use an empty string:
IIF([LOCDESC]=0, "<NULL>", [LOCDESC])
IIF([LOCDESC]=0, "", [LOCDESC])
After we translate the fields to values, we pass the expression to the MSScriptControl.ScriptControlClass object. I think you want to us the isNull expression, so like below:IIF(isNull([FIELD]),TrueValue,FalseValue)
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.