Has someone already worked with the forEach method ?
Instead of using a "For Each" then, inside it, a "If" followed by a "Set feature attribute" activity, I'd like to use an "Evaluate expression" activity which combines the 3 in a Javascript way.
It would look like this, I suppose :
=$query1.features.forEach(function(feature){if (condition) { feature.attribtes["x"]="y"} }) ;
-
@Guillaume Ruelle? Did you ever get this working, and if so, could you please provide an example?
0 -
@Bingham, Bryan? I didn't figure out how to do that. But I actually managed to use others JS method in other expressions like :
=$SelectionCollection.result.push({feat: $QueryLayer.results, name: $QueryLoop.item.name, count:$QueryLayer.features.length})
=$MainForm.state.ResultPicker.value.items.map(fs => fs.value)
If you find a way, thx for letting me know !
Regards,
Guillaume
0
Please sign in to leave a comment.
Comments
2 comments