Select to view content in your preferred language

Preventing Duplicate File Uploads and Displaying File Name in Survey123 Repeat

156
2
3 weeks ago
DennisBalster
Emerging Contributor

Hello,

I have a question related to creating a Survey form that I can't figure out.
I have created a web form with a repeat in it. In this repeat it is possible to add a file and answer a question what kind of file this is e.g. a log file or a survey drawing(so not to be confused with the extension).
The file name is also recorded in a field called DocumentName. So far, this works. Now the form automatically returns to the completed variant after 2 seconds as feedback for the end user.

Two problems then arise that we don't want because of data proliferation.
1. it is again possible to add a file to the form: After adding a file, it should not be possible to do it again. 
2. the DocumentName is not shown because it depends on the file field.: I want to use this field to see if a file has been added, if so then it should no longer be possible to add files

I managed to get each point working separately from each other with If Stamtements e.g. if(string-lenth(${DocumentURL}) != 0,${DocumentURL}, ${PDF_document}) but whether to get them both working at the same time then I get messages like this: Dependency cyles among the x path expressions in relevant.

Would love to hear someone's solution, I've been working on it myself for too long, so I might be overlooking something simple

 

Tags (2)
0 Kudos
2 Replies
AmeWunderle
Regular Contributor

Hi Dennis,

I wonder if you could use a repeat count and then constrain it to 1? Repeats—ArcGIS Survey123 | Documentation.

As a numeric value is required for the repeat count column, you could calculate it to be 1 once your file name has been entered?

Cheers

0 Kudos
DennisBalster
Emerging Contributor

Unfortunately this does not work. because when you create a new repeat then the number is always present.
This does work for example with the GlobalID field. Because this is empty when creating the repeat but is only filled when uploading.
I am now thinking that I could probably handle this with an Attribute Rule.

In any case thanks for the thoughts

0 Kudos