Conditional Layer display by Map visibility/query with arcade in Popup

182
0
04-26-2021 02:47 PM
Labels (1)
RichfieldMN
New Contributor

Hello,

I have two layers on my map:

1) Projects

2) Buildings

Every time a Project is created related to a specific building, the new "project name" field is added to the Building's pop-up. (like a list, when you click on the building, you see a list of all project names that has been created for that building)

Building's pop-up is just a list that keeps increasing as new Projects get created.

 

I would like to know if that's possible to create a conditional statement inside the pop-up where only the Projects  visible on the map are seen inside Building's pop-up. In other words, if I turn off the Projects layer on the map, and then click on any building, the pop-up would show up empty because the Project layer is turned off.

My use case would be in the Operations Dashboard, I have a widget that queries the Project by type. That query creates an action on the layer on the map querying only the Projects with "cleaning type" as an example. So when I go click on the Building, the list on the Building's pop-up would only show project names that has "cleaning" as project type. If I change my query on the dashboard widget for "restoration type", the building's pop-up would show a list with only project names which has "restoration" as type.

Does anybody know if that's possible? (Conditioning with arcade in pop-up menu whether the layer is visible on the map)

Thank you!!

0 Kudos
0 Replies