Hello! Came across what I believe to be a minor bug in the code blocks on Community posts.
var id = "@id"
In composing this post, here's what I see:
I'm going to save this post, and if it behaves like I saw in another post recently, it's going to be different. Will edit this post shortly with the results.
Well, it didn't do it. I'll post the full code from the related post:
var fs = FeatureSetByName($datastore, "Hydrant Inspections")
var id = $feature.hydrantID // just replace with your own field name as needed
// Get inspections for clicked hydrant
var filt_fs = Filter(fs, "hydrantID = @ID")
// Order inspections with most recent first
var ordered_fs = OrderBy(filt_fs, "InspectionDate DESC")
// Return most recent inspection specific to hydrant
var inspection = First(fs)
return inspection.InspectionDate
Perhaps it behaves differently in a reply than the main post, or perhaps that other post was just a fluke. Again, what I'm seeing while composing:
There it goes!
Stranger still, if I go to edit that post and change the expression the '@ID' portion of the code block is dropped entirely.