I am attempting to tweak the XLS form fields created from an existing feature service in order to populate two tables, but it isn't working. I think I understand why but not how to fix the problem...or even if what I'm trying to do is possible.
Here's the basic structure of my data in SDE:
Sample Sites (point data)
==> Related Table: Bacteria Samples [1:M, SiteHasSamples, related on SITEID fields]
Bacteria Batch (table)
==> Related Table: Bacteria Samples [1:M, BatchHasSamples, related on GlobalID/ParentGlobalID fields]
What I want is a survey that populates the Bacteria Batch & Bacteria Samples tables only. But, since the Batch table is not related to SampleSites, it does not get included in the XLS form created from the existing feature service. Here are my tweaks to the XLS to include Batch in the survey:
- delete all fields related to Sample Sites
- replace them with my Bacteria Batch fields
- keeping Bacteria Samples as a repeat
- change the form_id to pweng.SLCOEN.BacteriaBatch.
But it's not working. I've been working my way through each error that the survey snags on when trying to publish it in Survey123 Connect (v2.6.6). Here's the current error:
I assume this is because I kept the samples fields in a repeat, and it thinks the repeat should be based on SITEID, but it's not anymore. As previously mentioned, I think I understand the problem but not how to fix it...or even if what I'm trying to do is possible.
I really, really want to figure out how to make this survey work. The fallback option would be to have 2 separate surveys and then manually copy in the unique BATCHID to each sample processed in the batch. Not horrible, but definitely not ideal.
p.s. More screenshots for context: