Select to view content in your preferred language

Edit operation failed. Message: Unable to complete operation. Details: Unable to perform applyEdits operation. Error: Invalid column value [SUB_YEAR].

207
5
3 weeks ago
-_Ashley-B-Potter_-
Frequent Contributor

 

Please see the video attached.

 

I had this functioning properly last week; however, I am now encountering an error message that I believed we had resolved. Please note that this field is not related to the subyear.

 

This only occurs if we are outside a record.

 

 

0 Kudos
5 Replies
AmirBar-Maor
Esri Regular Contributor

@-_Ashley-B-Potter_- 
Do you use Attribute Rules that use the SUB_YEAR field? Perhaps they expect a value that does not exist (e.g. 'NULL').

Technical support can also help here.

 

0 Kudos
-_Ashley-B-Potter_-
Frequent Contributor

@AmirBar-Maor I do have an attribute rule that pertains to a sub-year. I also have another one that is identical to it but a different field that is not prompting any issues.  I will look at it again. @RobertChaney 

 

 

Attribute Rules: 

var sourceTable = FeatureSetByName($datastore, "L1Records", ["TaxYear"], false)

$feature.CreatedByRecord;

var createdBy = $feature.CreatedByRecord

var fabricRec = First (Filter (sourceTable, "GlobalID=@createdBy"))

var fabricRecTaxYear = "No Tax Year found"

if (fabricRec != null){

    var fabricRecTaxYear = fabricRec.TaxYear

}

return fabricRecTaxYear

 

 

 

var sourceTable = FeatureSetByName($datastore, "L1Records", ["SubYear"], false)

$feature.CreatedByRecord;

var createdBy = $feature.CreatedByRecord

var fabricRec = First (Filter (sourceTable, "GlobalID=@createdBy"))

var fabricRecSubYear = "No Sub Year found"

if (fabricRec != null){

    var fabricRecSubYear = fabricRec.SubYear

}

return fabricRecSubYear

 

0 Kudos
AmirBar-Maor
Esri Regular Contributor

I have modified your expression

  1. Account for the situation in which CreatedByRecord is empty = NULL. For example, if someone forgot to create an active record.
  2. Use the IsEmpty method instead of checking for 'null'
  3. Only create a FeatureSet if the CreatedByRecord is not empty
  4. A bit of cleanup

For better performance, you can use the triggering fields to only trigger the rule when the CreatedByRecord field is changed.

Let us know if this helps

var sourceTable = FeatureSetByName($datastore, "ParcelFabric_Records", ["SubYear"], false)
var createdBy = $feature.CreatedByRecord
If (!IsEmpty(CreatedBy)){      //if the CreatedByRecord is not empty
    var fabricRec = First (Filter (sourceTable, "GlobalID=@createdBy"))
    if (!IsEmpty(fabricRec)){ //If the returned record is not empty = record was found
        return fabricRec.SubYear        
    }
}
return "No Sub Year found"
0 Kudos
-_Ashley-B-Potter_-
Frequent Contributor

@AmirBar-Maor Thank you. I will give this a shot and update accordingly. 

0 Kudos
-_Ashley-B-Potter_-
Frequent Contributor

@AmirBar-Maor we had to summit a ticket