Select to view content in your preferred language

Submission URL conditional on user

519
2
02-20-2023 04:13 AM
CherylWheeler11
Occasional Contributor

Hi,

I am wondering if it is possible to have a conditional statement in the submission_url cell in Survey123 Connect?

Basically, I am trying to send my test/dummy surveys to a copy of my 'in use' feature service, so as to not keep writing my test surveys to the 'live' feature service, if the user submitting is, for example, testuserA or testuserB. So, essentially a testing environment.

I was thinking of something like:-

If (property('username')="UserA", https://*******/featureserviceA, https://*******/featureserviceB)

Would this work in the submission_url column in Connect?

Thanks for any help.

 

0 Kudos
2 Replies
MobiusSnake
MVP Regular Contributor

I don't think that's possible but I could be wrong.  However, this might be an alternative approach you could use...

  • Create an "is_test_record" field in your feature layer, small integer
  • Have a calculated question in your form that checks the username and submits 0 for most users, but a value of 1 for your test users
  • Create a hosted feature layer view with a filter of "is_test_record = 0" to hide test records and use this view for all production maps, dashboards, etc.  Only share this view with most users, heavily restrict access to the base service

Also note if you have repeats you'll need to do the same on your related tables.

0 Kudos
CherylWheeler11
Occasional Contributor

Ah cool. Thanks very much. I will give it a go. I hadn't thought abut that approach. 😊

0 Kudos