Okay thanks everyone for replying to this and to helping me figure out how the community pages are set up. Anyway this definitely belongs in the Questions, and I had a chance to return to it. I don't know what I was doing wrong before, but I got the basic set up to work, generating a point in feature class B. I want to expand on that now and I'm looking for just a bit more guidance.
Here's the background and the attribute rule as it stands right now: I have a layer of park assets managed by Parks Maintenance staff, and a layer of points representing recreation opportunities managed by Parks Recreation staff that will be used in a public facing application. Sometimes but not always, assets are also recreation points (think Tennis Courts). A challenge I have right now is that the Assets call those features "Tennis Court" and the Recreation Points call those "Tennis". What I want to do is alleviate the need for these two groups to communicate when new points are added by running this auto-generate-point rule.
var pf = Geometry($feature)
var t = $feature.AssetType
var a = $feature.AssetID
return {
edit: [{
"className": "RecreationPoints_Backup",
"adds": [{
"attributes": {
"RecType": t,
"Name": a
},
geometry: pf
}]
}]
}
If I leave this as is, Tennis Court would be written from Assets into Recreation which would then not be symbolized or display correctly because of the nomenclature mismatch. So my question is this:
How do I use a dictionary of values present in the Parks Assets to then write a similar but not identical value into the Recreation points? It would be something like
var dict = {
"Tennis Court": "Tennis", etc etc etc}
but I am really unfamiliar with this function and how I would go about making sure the write-to feature class gets the correct value.
Happy mapping,
- Zach