Select to view content in your preferred language

Surevy123: Can data be pulled from the parent feature to the related table?

98
4
Jump to solution
yesterday
JacklynWaronek
New Contributor II

I want to pulldata that is within the parent feature (specifically the Facility Name, Facility ID, and Contractor Name). These attributes are filled within the feature parent but I want that same info to be brought into the related table. This is for a vegetation control inspection so the relationship is a 1 to many. 

 

I want this so that if data is extracted from the related table that the user still knows which facility it is referencing. 

 

I figure I can pull the data from the GlobalID and GUID keys, but I'm not exactly sure how to set this up. 

 

I'm not sure if this is possible, or who knows, maybe it's not necessary.

 

Let me know your thoughts 🙂

0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Esteemed Contributor

Makes sense, we've got similar flows ourselves. No worries!

If you're already getting the field map to generate the link, just include field parameters. I'm assuming that's how you pipe in the GlobalID of the facility so that the created record is actually linked, yes?

If you're making your link in a basic text portion of your popup, you can just put curly braces around the parent field name.

&field:Parent_Facility_ID={facility_id}&field:Parent_Facility_Name={facility_name}

You could also create the link using Arcade, which would look differently.

- Josh Carlson
Kendall County GIS

View solution in original post

4 Replies
jcarlson
MVP Esteemed Contributor

What does your form look like? If the related table questions are inside of a repeat, you can reference values outside of the repeat. Just put a hidden calculated field in the repeat with the value ${parent-layer-field-name} in the calculation column. As long as the field name is not re-used between the parent and child tables, it should work just fine.

- Josh Carlson
Kendall County GIS
JacklynWaronek
New Contributor II

So it's a bit more complicated. I have the form set up so that the user is not creating new data for the parent feature. What happens is that they use field maps to open the map, and then there is a link within the popup of each facility that is identified with the GUID. The survey123 form only includes questions from the related table. I have the form spreadsheet attached. 

I have it set up that the user does not edit any facility data as it is static. All dynamic questions are located in the related table. I hope this makes sense?

I currently have tried a pulldata layer function to try and pull the json data of the parent to see if that would work. The problem is that I don't know how to set up the Where Clause since there is no location reference in the form.

pulldata ("@layer", "getRecord", "[feature-link]", ${GUID})

 

I hope that gives a bit more context. 

 

PS: I know I could just use field maps for data collection, the downside is that there is no option for a multiple selection question that I need (if they identify invasive vegetation, they need the option to select more than one). Where survey123 has this option. Just trying to make the best of both worlds. 

0 Kudos
jcarlson
MVP Esteemed Contributor

Makes sense, we've got similar flows ourselves. No worries!

If you're already getting the field map to generate the link, just include field parameters. I'm assuming that's how you pipe in the GlobalID of the facility so that the created record is actually linked, yes?

If you're making your link in a basic text portion of your popup, you can just put curly braces around the parent field name.

&field:Parent_Facility_ID={facility_id}&field:Parent_Facility_Name={facility_name}

You could also create the link using Arcade, which would look differently.

- Josh Carlson
Kendall County GIS
JacklynWaronek
New Contributor II

Oh my gosh!!!

That's the answer! I've been struggling to get this to work for weeks! Thank you so much, I really appreciate the help!!!!

0 Kudos