Select to view content in your preferred language

CSV Pulldata into a related record using Inbox

470
5
09-13-2024 07:21 AM
MT_JenAmes
Regular Contributor

I'm trying to create a Survey123 based basin inspection, done as a related record associated with an existing storm water basin hosted feature layer. I'm looking into using the Inbox, which would be nice that it would populate some information from the basin that's necessary in the inspection forms. My struggle is coming where I'm trying to set up a csv for pulldata functions that pre-populates a bunch of questions that stay the same consistently, but are different for each basin.

For example, basin #37 is easily accessible and has gentle slopes. So I'd like to be able to select basin #37 from the map or Inbox list, and have the Accessible and Slope question populate with "Easy" and "Gentle" answers, so the inspectors don't have to fill those fields out. 

Am I doing something wrong with my calculations? Is it not possible to pre-populate answers based on a read-only, non-select_one field? Any guidance on how to add related records with pre-populated answers to an existing feature class using Survey123 would be great.

0 Kudos
5 Replies
DougBrowning
MVP Esteemed Contributor

Try testing taking off read only.  It tends to think those cannot change and then does not run the calc.  Also from Inbox it does not always fire the calcs.  You could try the calculation mode always and see if that does it.

What we do though is open the Parent in Field Maps then use a Launch URL to pass the values over to 123.  Works slick and it gives them a map to navigate to the location.  Plus we can lock down the parent from edits.  I would consider that.

0 Kudos
MT_JenAmes
Regular Contributor

I initially tried it as a link in the pop-up of Survey123, but the related table submissions didn't link to the parent feature, and I couldn't figure out why. Did some googling, and saw someone with a similar style project to mine, and saw a suggestion of using the Inbox, so I gave that a try, and was able to get the related table submission to attach to the parent feature, but then couldn't get the pulldata to work.

I took read only off, and that worked! Thank you. I was hoping I wouldn't have to do that, but now I'll just have to hope that nobody edits that data 🤞

DougBrowning
MVP Esteemed Contributor

See if the calculation mode always works but not sure it does in Read only. 

You could also hide it but then they can't see it.  Or hide that field then use a note for display to the user could work.

For the parent issue you can use Arcade and FeatureSet to grab anything from the related table and then use that in the URL to pass.  I do it a lot.  The {relationship/} method should work but I found out it does not.

0 Kudos
MT_JenAmes
Regular Contributor

It seems the calculation doesn't want to work in Read only, so I'm throwing all the information I don't want them to edit in a collapsed group. Close enough to fixing my problem.

The "use Arcade and FeatureSet to grab anything" sounds great and all, but I have no idea how to do that. But thank you anyway! Lol

0 Kudos
DougBrowning
MVP Esteemed Contributor

Its pretty easy.  

var tbl = FeatureSetByRelationshipName($feature, "Points", ['CollectCoreSubset1'], false);
return First(tbl).CollectCoreSubset1

0 Kudos