Skip to main content
Nintex Community Menu Bar
Question

File attachments - check for duplicates on a form

  • April 8, 2026
  • 5 replies
  • 58 views

Forum|alt.badge.img+16

Hi,

Is there a quick way to check file attachments added by a user to form for duplicate names? Users occasionally add the same attachment which causes problems down the line, so I would like to deal with the issue before the K2 forum is sent.

The users use a K2 form button to add attachments and they appear in a List view on the form.

What is the best way to prevent them adding duplicates or sending the form if there is a duplicate document attached

 

Thanks  

5 replies

Forum|alt.badge.img+16
  • Author
  • Scout
  • April 22, 2026

Is there an expression that I could use? 


Forum|alt.badge.img+16
  • Author
  • Scout
  • April 27, 2026

I looked for previous posts on checking for duplicate rows in a List View, but all the links in those posts go to the Nintex main page. Are they archived anywhere?

Anyone got a solution for adding an Attachment and how to prevent the user adding an attachment with the same name they already added to a List View?


ScottCaseIT
Nintex Partner
Forum|alt.badge.img+4
  • Nintex Partner
  • April 28, 2026

In the rule that fires when the file goes to be added, you can use a condition to loop through all the rows in your list view and check the uploading file against the file names of the entries in the list already. You can The loop is on the conditions tab of the rule wizard, and you’ll also want to use and advanced condition to check the names. 

 

Here is the help link for configuring loops: Configure For Each Looping Conditions


Forum|alt.badge.img+16
  • Author
  • Scout
  • April 29, 2026

In the rule that fires when the file goes to be added, you can use a condition to loop through all the rows in your list view and check the uploading file against the file names of the entries in the list already. You can The loop is on the conditions tab of the rule wizard, and you’ll also want to use and advanced condition to check the names. 

 

Here is the help link for configuring loops: Configure For Each Looping Conditions

 

Thanks for the link, still can’t quite get it to work.

 

There is a List View on a Form and also a Item View on a Form.

I attach the file via the Item View which is loaded as Subview via an Add file button on the List View. When the Save button on the Item SubView is clicked, it adds the file to the List View on the Form.

 

I think the best place for the rule to check if the file exists in the List View, is at the point the user clicks the Save button on the Item view.

Before the file is transferred to the List View, I added a All Row on List View, but can’t find a condition or action to take the file and match it against what’s already been added to the List View.

There isn’t anything in the rule designer context browser show the list view to match the attached file against the already attached files in the list view on the form. Context browser only shows the item view and Smartobject, the  list view does not appear in the context browser.

 

Even if i do a seperate rule to do a check on all Rows, i retreive the SMO File and instead of just retrieving the name, it contains a huge path in html encoding. You can’t pick Filename properties etc, only the File

Any help would be appreciated

Thanks 


Forum|alt.badge.img+16
  • Author
  • Scout
  • May 6, 2026

Got this working, if anyone else needs to do this:

In your SMO that is attached to the List View which you add the attachments to, add an extra field in the SMO called something like File Name - This will hold the file name (without the path). Then go into the List View and add the new File Name column and untick Visible under the Column Tab.

Then you just need to Rules.

  1. When a new file is attached, send the name of the attached file to a data label and go run a Duplicates Rule
  2. Create a Duplicates Rule which does a For Loop through all the Rows in the List view, using the data label from step 1 to compare each row File Name with the data label.
  3. If there is a Match, pop-up a message box and stop the rule from going any further. -This drops the user back to the File attachment mechanism to let them choose how to proceed.

    The compilation and time spent on this was from me trying to workaround the File Attachment field having paths in it, which I couldn’t use as a comparison. In the advanced rule, I wanted EQUALS, not contains. If you use contains - this could be a short word in a bigger File name, so would have got rejected. The solution above works and gets around this as both sides of the Advanced rule must match. HOpE this helps someone save on the time it could me to get this working.