Select to view content in your preferred language

Allow "Operational Rows" in Survey123 Connect

218
10
Jump to solution
Monday
ZachBodenner
MVP Regular Contributor

Let me first state that I have no idea really what goes into the development of a product like Survey123, which means that this suggestion may be totally unworkable, but here we go:

Allow "operational rows"

Many of my surveys are build on referenced feature services, which have a pre-existing data schema including the data that we actually need for that service. In order to use Survey123 to its greatest potential, it's often necessary to add rows (corresponding to attribute columns) to accomplish things like calculations or to hold a value that gets used by a different question in the survey. These rows might be totally useless other than to provide context for a different question. 

As an example (uncommon scenario, but play along), say I want to get the number of the current day of the month so I can use that in a calculation, say to concatenate a unique ticket number. In order to do that, I need a row that gets a date, either the current one or one I select. If I don't actually need that date field for anything else, it just sits there, a requirement of a good survey form, but important to my dataset overall. Or perhaps I am using an API to get real time data - I will need a row to hold a JSON response, but the weighty, long text field is otherwise unimportant after the fact.

What I would love to see is the ability to add lines to a Survey that DONT correspond to a data column in the feature service that can be used to hold values, run intermediate calculation, etc, so my dataset isn't cluttered by Survey123-specific needs. We take great care to build good datasets, and Survey123 should be a way to extend them, not to bloat them for the purpose of a usable survey form.

1 Solution

Accepted Solutions
ToddW_stl
Esri Contributor

hi @ZachBodenner - If I understand what you're looking for, you'll want to set the bind::esri:fieldType column to null in your XLSForm (if using Survey123 Connect).  See this article: https://community.esri.com/t5/arcgis-survey123-blog/the-power-of-nothing/ba-p/893649 .

Also, since you're using a registered feature service (not hosted), you could use a Database Sequence and Attribute Rules (with Arcade) on your feature class to handle the unique ticket numbering.  See here: https://community.esri.com/t5/attribute-rules-videos/generating-unique-ids-with-attribute-rules/td-p... 

View solution in original post

0 Kudos
10 Replies
ToddW_stl
Esri Contributor

hi @ZachBodenner - If I understand what you're looking for, you'll want to set the bind::esri:fieldType column to null in your XLSForm (if using Survey123 Connect).  See this article: https://community.esri.com/t5/arcgis-survey123-blog/the-power-of-nothing/ba-p/893649 .

Also, since you're using a registered feature service (not hosted), you could use a Database Sequence and Attribute Rules (with Arcade) on your feature class to handle the unique ticket numbering.  See here: https://community.esri.com/t5/attribute-rules-videos/generating-unique-ids-with-attribute-rules/td-p... 

0 Kudos
ZachBodenner
MVP Regular Contributor

To the first part, I wasn't aware of the functionality actually! I'll give that some tests but it sounds like that would satisfy my idea.

As to the second, one issue I'm finding is integrating Survey123, Attribute Rules, and Power Automate. Power Automate will trigger on a survey submission before the attribute rules run, which means that dynamic content created from attribute rules isn't included. This is a bit beyond the scope of this request, but that's the background to why I'd want to generate ticket numbers in Survey123 as opposed to the database. 

I think you could probably mark the idea as closed though based on the bind::esri::fieldType = null suggestion.

0 Kudos
ToddW_stl
Esri Contributor

@ZachBodenner - I think you may have to mark it as the solution.  Your remaining issue is interesting, we find that our ticket numbering and attachment count attribute rules (3 total) run after surveys are either submitted or edited (via Power Automate integration).  What kind/how many attribute rules do you have set up?  I don't think your issue should be happening, but then again, we've seen issues with Power Automate too (cc: @LaurenLovato )

0 Kudos
ZachBodenner
MVP Regular Contributor

No, you pretty much described what I'm experiencing: attribute rule calculates the ticket number, but because the Survey123 submission doesn't include the ticket number being calculated in it, Power Automate sends an email immediately, before the attribute rule runs.

0 Kudos
ToddW_stl
Esri Contributor

Is the ticket number being calculated in the Survey123 form, or is it an attribute rule (or both - which could cause conflicts)?  Do the survey submitters need to see the ticket number?  Ours are calculated in the database via attribute rule immediately after submission, before Power Automate sends an email (see below).  Also, if one of my answers above helped with the initial problem, please don't forget to mark as a solution to help others that may find this in the future!

ToddW_stl_0-1724784864488.png

 

0 Kudos
ZachBodenner
MVP Regular Contributor

They're currently being calculated only in attribute rules. Basically my end goal is the same as your screenshotted email, but my ticket number just doesn't show up.

0 Kudos
ToddW_stl
Esri Contributor

the ticket number attribute doesn't populate, or the sequential numbers aren't being added from the database sequence, or something else?  can you share a screenshot of your attribute rule settings?  unsure if it matters, but what versions of ArcGIS Pro and ArcGIS Enterprise are you working with?

0 Kudos
ZachBodenner
MVP Regular Contributor

The attribute rule is pretty simple:

"Req-"+NextSequenceValue("Seq311_1")

 

It's running on insert, excluding from batch. I know the rule is running because the ticket number is visible as soon as I look at the resulting point in a web map, in Pro, etc. We're on 11.1, so I do know that there's a few complicating factors there.

0 Kudos
ToddW_stl
Esri Contributor

here are our settings, if it helps - ArcGIS Enterprise 11.3

ToddW_stl_0-1724856625289.png

 

0 Kudos