#arcade arcade expressions #arcade attribute expressions
Here is what I've come up with, the error I get is that the output is resulting in a NaN, or Infinity.. I'm not sure how to address that.
var ShpSize = Area($feature, 'square-feet');
var RelTblFld = FeatureSetByName($datastore, "RelatedTableName", ["LongIntField1"]);
var Output = Round((RelTblFld)*(ShpSize), 2);
return Output
How many items are you trying to multiply together to get the result? Do you have a relationship class set up for the 1:Many relationship? You could try something like:
var results = FeatureSetByRelationshipName($feature, "relationship_class_name", ['LongIntField1'], false);product = Area($feature, 'square-feet')for (var r in results) { product = product * r.LongIntField1; }return product;
var results = FeatureSetByRelationshipName($feature, "relationship_class_name", ['LongIntField1'], false);
product = Area($feature, 'square-feet')
for (var r in results) { product = product * r.LongIntField1; }
return product;
I might be misunderstanding which sign of the 1:many relationship you're trying to access, but it should work either way. If you're multiplying something from the 1 side to the many side, just replace the for loop with
var r = First(results);
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.