AnsweredAssumed Answered

How to Return a Null Value in Attribute Rule

Question asked by geord359 on Jan 18, 2019
Latest reply on Jan 18, 2019 by xander_bakker

We are using the Add Attribute Rule tool to execute an arcade script (Script 1). This is for an app we are developing. I want the script to return null in the “PlannedClosureStart” date field (line 3) when “No” is input in the “PlannedClosure” text field (line 0). However, when I try to add this the tool returns the error “ERROR 000358: Invalid expression Failed to execute (AddAttributeRule)”.


Is it possible to add null values to date fields in an arcade script?


Script 1


var PlannedStart = $feature.PlannedClosure;

if (PlannedStart=="Yes") {

    return $feature.PlannedClosureStart


else return null