Select to view content in your preferred language

Reports: Map Filters: Use field as variable in where clause?

174
1
Jump to solution
a month ago
AlfredBaldenweck
MVP Regular Contributor

Map expressions—ArcGIS Survey123 | Documentation

I'm trying to use a map question in my report. In it, I'm attempting to filter down layer 3 where its field "grnduuid" is equal to this survey's inspuuid.

Here is an attempt:

${$map | map: “3d6eb5778a174e55ad2a1a75783eeade” | mapFilters: “’196ef2e95d0-layer-3’: where=grnduuid=inspuuid”}

Here is another:

${$map | map: “3d6eb5778a174e55ad2a1a75783eeade” | mapFilters: “’196ef2e95d0-layer-3’: where=grnduuid=SURVEY_TABLE.inspuuid”}

Here is another (failed in syntax check)

${$map | map: “3d6eb5778a174e55ad2a1a75783eeade” | mapFilters: “’196ef2e95d0-layer-3’: where=grnduuid=${inspuuid}”}

ditto for 

${$map | map: “3d6eb5778a174e55ad2a1a75783eeade” | mapFilters: “’196ef2e95d0-layer-3’: where=grnduuid=@inspuuid”}

What gives?

How can I call a variable in a where clause?

0 Kudos
1 Solution

Accepted Solutions
AlfredBaldenweck
MVP Regular Contributor

Figured it out from @CarissaPhantom's post .

Proper way to go is:

${GeoPoint Question in Survey  | map:"ITEMID"| mapFilters:"'18fe96a428a-layer-22':where=Numb='"+ProjectNumber+"'"}

 

@CarissaPhantom: If you post this exact post here, I'll change this answer from being the solution to yours so you get the credit. Thank you for figuring this out.

 

View solution in original post

0 Kudos
1 Reply
AlfredBaldenweck
MVP Regular Contributor

Figured it out from @CarissaPhantom's post .

Proper way to go is:

${GeoPoint Question in Survey  | map:"ITEMID"| mapFilters:"'18fe96a428a-layer-22':where=Numb='"+ProjectNumber+"'"}

 

@CarissaPhantom: If you post this exact post here, I'll change this answer from being the solution to yours so you get the credit. Thank you for figuring this out.

 

0 Kudos