AnsweredAssumed Answered

can i build a survey that populates a table *not* related to the spatial data layer in my existing feature service?

Question asked by LBerni@slco.org_slco on Jul 12, 2018
Latest reply on Aug 8, 2018 by MKellyesri-ireland-ie-esridist

Hello,

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 BatchBacteria 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:

  1. delete all fields related to Sample Sites
  2. replace them with my Bacteria Batch fields
  3. keeping Bacteria Samples as a repeat
  4. 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.

 

Please help!!!
Thanks,
Lynn

 

p.s.  More screenshots for context:

 

Outcomes