I have a fairly simple issue. I have a public dataset for inspection of street lights. I have connected a survey123 schema to the feature set.
I want to show all street lights that are "OK" with a green symbol. I a malfunction is reported, the symbol changes to red.
I want the Popup to show a url to the survey123 when you click on a "green" symbol. If a malfunction is reported, you get a message stating something like "a malfunction is already reported".
In a field list in the popup, I can get this fairly easy with an iif-arcade expression:
Var SurveyURL = "https://survey123.arcgis.com/share/e59bac1c82004ee49bc1dbfb321a0fd0?mode=edit&globalId=" +$feature.GlobalID IIF($feature.Feilmelding=="OK", SurveyURL, "Det er alt meldt feil på dette lyset")
This look like this in the field list:
Var SurveyURL = "https://survey123.arcgis.com/share/e59bac1c82004ee49bc1dbfb321a0fd0?mode=edit&globalId=" + $feature.GlobalID
Var Feilmelding = $feature.Feilmelding=="OK"
Var Resultat = `<strong>"Det er allerede meldt feil på dette lyset"</strong>`
if (Feilmelding) {
return
Resultat = `<p><strong><a href="${SurveyURL}">Meld inn feil på lyspunkt</strong></a></p>`
}
return {
type : 'text',
text : Resultat
}