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 🙂
Solved! Go to Solution.
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.
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.
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.
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.
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!!!!
@JacklynWaronekand @jcarlson this is an older post, but I'm working on something similar and I'm wondering if you could help fill in some blanks for me. I'm new to all this and apologize if these are basic questions! My head is spinning from trying to understand all the esri community posts, blogs, and videos, but many are based on AGOL and I am using Portal.
I want my users to be able to click on a facility in a webmap and from a link within the pop-up, be able to submit a survey which feeds a related table of inspections. I have created a survey from an existing feature service (published from Pro 3.3) that has a point layer (my facilities) and related table (containing one initial inspection of each facility) and my survey123 form only includes questions from the related table. I am not clear on how the submitted survey is tied to the parent facility. Is that a product of the URL that a user clicks to get to the survey from a facility's pop-up? And/or from how I configure my XLSForm (e.g. do I need to use the pulldata function somehow? but somehow from my parent layer based on which facility was selected in the map).
I may be in over my head, but I appreciate what you can share!