Hi, I have a problem about using Arcade .
When I run this code, I get an error message
I don't know how to fix it.
Thanks
var contents = FeatureSetByAssociation($feature, 'connected')
var updateList = []
var counter = 0
for (var content in contents) {
updateList[counter] = {
'globalid': content.globalid,
'attributes': {
'topageno': frompageno,
},
}
counter++
}
return {
'result': $feature.frompageno,
'edit': [
{
'className': 'xxxxxx',
'updates': updateList,
},
],
}
D,
Want to get a few bits of details. Is this being used for Utility Network?
Also, have you run this in a console or do a simple error message to get a count of the contents?
I'm wondering if the counter is not advancing.
var contents = FeatureSetByAssociation($feature, 'connected')
// If there is no contents, exit the function
if (count(contents) == 0) {
return null;
}
var updateList = [];
var counter = 0;
for (var content in contents) {
updateList[counter++] = {'globalid': content.globalid,
'attributes': {'topageno': frompageno}
};
}
return {
'result': $feature.frompageno,
'edit': [{
'className': 'xxxxxx',
'updates': updateList
}]
}
~Jake