Select to view content in your preferred language

Show custom message

473
1
04-03-2023 08:12 AM
BrianBulla
Honored Contributor

Is it possible to use Arcade to show a custom message once a feature is selected in the map?  For example, from the feature selected, I would like to show a message that indicates if there is any outstanding work that needs to be done (based on some business lgoic that would look at the related inspection records for that feature).

We are currently using ArcPad to do this, but with transitioning to Field Maps we are trying to replicate as much functionality as possible.

Thanks

0 Kudos
1 Reply
DougBrowning
MVP Esteemed Contributor

Yes I do this a lot for our field data.  I actually tell them if they got all 12 forms done or not.  I can even do pattern matching so that it makes sure they did 1,2,3 not 2,2,3 for example.  I then use red to make it pop.

DougBrowning_0-1680545751473.png

All done with FeatureSet just run a query like this.

var EvaluationID = Concatenate($feature.PointID, "_", text($feature.FieldEvalDate, "Y-MM-DD"))
var sql = "EvaluationID = '" + EvaluationID + "'";
var tbl = Filter(FeatureSetByName($map,"Water Quality and Macroinvertebrates", ['EvaluationID'], false), sql);

if (count(tbl) > 1) {
return "More than one form found"
}
else if (count(tbl) < 1) {
return "No forms found"
}
else {
return "1"
}

Hope that helps