Select to view content in your preferred language

How to Clear Specific Fields When Copying a Survey123 Form

370
5
Jump to solution
03-15-2026 11:21 AM
LaurentSavoy1
Occasional Contributor

I want to allow users to duplicate a Survey123 form on their tablet. However, I need some fields (such as validation or approval fields completed by another person) to be automatically reset when the form is copied.

How can I configure the form so that these fields are cleared when a survey is duplicated?

0 Kudos
1 Solution

Accepted Solutions
LaurentSavoy1
Occasional Contributor

I think I manage to do what I want.
Playing with a select_one yes_no with if(pulldata("@property", 'mode') = 'new',1,0) in calculation
and relevant on a groupimage.png
If I copy the form, the relevant hide the group, the relevant erase the field. But if I edit or view, the relevant stay 🙂

View solution in original post

0 Kudos
5 Replies
Neal_t_k
MVP Regular Contributor

@LaurentSavoy1 You could try this, it appears to work with some quick testing, but assumes that users would be copying surveys sent on a different day than the survey being copied...

Set a date question to today() and set calculationMode=always in the bind::esri:parameters column.  Set any questions you want blank to be relevant on ${Date}=today().  In theory when it opens the expression should be false and those questions should be not relevant, but it will automatically recalculate the date to today() and they should become relevant, but blank.  If you make that date question null, it may function with surveys submitted the same day.  Again I did some brief testing but you would have to test more thoroughly to make sure it works for your situation. See attached example

Screenshot 2026-03-16 144442.png

Depending on your survey, you may be able to do something similar based on a different question.

Hope that give you some ideas

0 Kudos
LaurentSavoy1
Occasional Contributor

@Neal_t_k Thanks for your answer I'll tink about it 🙂

My final objective is to change the color in my instance name:

  • Green when it has been validated by QA/QC
  • Orange when it is not yet final
  • Red when it is false

I want my users to be able to copy a survey to start again from certain information—but not all of it, such as the validation field. I want this field to reset when the survey is copied, but not when the form is edited.

I tried using a count on a signature, but when the form is re-edited and resubmitted, the calculation no longer runs.

 

image.png

Instance name

if(
${Signature_Operator_count} = 1,
concat(
'<font color="green"><b>${Operator}</font>')

 

in calculation field
if(count-selected(${Signature_Operator_count) > 0, 1, 0)




0 Kudos
Neal_t_k
MVP Regular Contributor

@LaurentSavoy1 Ah, yeah that solution would recalculate on edit too.  Have you considered instead of copy to a new survey, using something like a pulldata from a csv or a pulldata(@layer) to calculate the repetitive entries based on a ID users would select at the beginning of the form?

0 Kudos
LaurentSavoy1
Occasional Contributor

I'll try this ! thanks for your support 🙂

0 Kudos
LaurentSavoy1
Occasional Contributor

I think I manage to do what I want.
Playing with a select_one yes_no with if(pulldata("@property", 'mode') = 'new',1,0) in calculation
and relevant on a groupimage.png
If I copy the form, the relevant hide the group, the relevant erase the field. But if I edit or view, the relevant stay 🙂

0 Kudos