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.
@-_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.
@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
I have modified your expression
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"
@AmirBar-Maor Thank you. I will give this a shot and update accordingly.
@AmirBar-Maor we had to summit a ticket