Select to view content in your preferred language

How do i pulldata twice, with the first pulldata functioning as a filter?

108
0
7 hours ago
Pieter_GlasgowGIS_Public
New Member

We are upgrading on of our survey123 forms in Survey123Connect where operatives select a site, and then select a piece of equipment at that site, both from the same hosted feature layer. Then we want to pull through some data from that piece of equipment in the background (so hidden in the survey) that we need for a dashboard somewhere else. We have it working that you can only select equipment where it has the site name equal the chosen site name. When we set it up to pull through the manufacturer details of that piece of equipment it fails. We currently have it set up as follows:

typenameappearancecalculation
select_one SITE_NAMESelect_Play_Areaautocomplete search("NAME?url=https://utility.arcgis.com/...") 
textPlay_Areahidden${Select_Play_Area}
select_one SITE_EQUIPMENTSelect_Equipmentautocomplete search("EQUIPMENT_SEARCH?url=https://utility.arcgis.com/...",'matches','NAME',${Play_Area}) 
textEquipment_Queryhidden${Select_Equipment}
textManufacturerhiddenpulldata("@layer", "getValue","attributes.MANUFACTURER","https://utility.arcgis.com/...",concat("NAME = '", ${Play_Area},"'") and concat("EQUIPMENT_SEARCH = '",${Equipment},"'"))


We noticed that the equipment autocomplete searches and pulldatas does not reliably work when referring straight to the Select_Play_Area the workaround is the Play_Area and Equipment_Query text rows.

We have a list called SITE_NAME and SITE_EQUIPMENT where the name and label are NAME and ITEM which are the field names we are looking for in the hosted feature layer.

We also pull some data through from just the site like the depot which does work. All rows with the same site name will have the same depot. For reference we do that like this:

textDepot_Namehiddenpulldata("@layer", "getValue","attributes.DEPOT","https://utility.arcgis.com/...",concat("NAME = '", ${Play_Area},"'"))

 

But with the manufacturer each piece of equipment at the site might have a difference manufacturer. So if we do not have a way to also specify the site name it will just just look at the top result of all equipment with the same name and return the manufacturer for that. And, unlike the depot where it is the same for all rows with the same site, the name of a piece of equipment can refer to equipment made by multiple different manufacturers.

So we would want:
Site A --> Equipment 1 --> manufacturer X
Site A --> Equipment 2 --> Manufacturer Z
Site B --> Equipment 2 --> Manufacturer X
Site B --> Equipment 1 --> Manufacturer Y

We are hoping it's just syntax but cannot figure it out. Co-pilot has not been useful either.

 

0 Kudos
0 Replies