Select to view content in your preferred language

Geometry calculation within repeat

486
3
05-09-2023 08:53 AM
mshanaghan
Frequent Contributor

Hello,

I want to be able to have multiple building footprints associated with one feature.

I have my form set up so that the user selects the name of a building from a drop down (select one from csv file in the media folder), and the building footprint is pulled in automatically from a hosted feature layer on my portal.

To do this, I used pulldata@layer within a repeat to pull the building footprint. The calculation works fine for the first selected building, but does not work for any repeats. The screenshots below show the repeat in the xls form and how it appears in Survey123 (when it works).

Does anyone see any reasons for why the calculation would work once, but not for any repeats?

Thank you.

0 Kudos
3 Replies
AllisonMartin
Emerging Contributor

Hello,

I am running into this exact problem.  My calculation works on the first repeat. but the second repeat and any others created after that just bring in the same geometry as the first and do not update when you choose a different building.

Did you ever find a solution or work around?  Thanks!

0 Kudos
DJerbCO
Emerging Contributor

Same here, following thread.

 

0 Kudos
AllisonMartin
Emerging Contributor

Following up on this.  I have a solution that works in theory but I haven't fully implemented it yet.  

The repeat in my survey collects the name of each building.  I then have a python script that creates a dictionary of building footprint geometry and assigns/updates the geometry (shape@) of any newly added items in the related table (where the repeat is stored). It uses the name of the building as a look-up.  

So far this works and I run the script manually.  Ideally it would be set up to trigger using a webhook and power automate,  but I haven't gotten that far yet.

0 Kudos