Skip to main content
Solved

Get File Name uploaded using the File Upload Control

  • 5 July 2024
  • 9 replies
  • 62 views

How would I get the name of the file uploaded in the NAC File Upload control?  I want to compare and ensure that the file name has not already been used.

 

 

9 replies

Userlevel 5
Badge +15

How would I get the name of the file uploaded in the NAC File Upload control?  I want to compare and ensure that the file name has not already been used.

 

 

Following. I'd love to know the answer to this one. I wish they had a toggle we could enable to avoid duplicate file names across all file upload controls per page of a form and/or a form entirely.

Badge +10

@csergent7 

 

One way is as follows:
    1) Loop Foreach file with Data type = Text
    2) On current loop item, Query JSON: $.blob.fileName

 

 

Userlevel 5
Badge +15

@csergent7

 

One way is as follows:
    1) Loop Foreach file with Data type = Text
    2) On current loop item, Query JSON: $.blob.fileName

 

 

This only resolves issues after the fact...how do you resolve before the user submits? In the form designer...

Userlevel 6
Badge +22

Hi @brandiwoodson 
 

Great question. Nintex has considered duplicate file names and does not allow them in the File Upload control. This policy applies to all file upload controls on the form.
If you try to add the same file name to any file upload control, it will be renamed.
 

 

Userlevel 5
Badge +15

This is good to know. Ill test this out. Last time i used multiple file upload controls it allowed duplicate file names across all file upload controls. 

Userlevel 1
Badge +3

If I set Workflow to not overwrite files, the workflow will error out if a duplicate file name exists. If the system can automatically detect that, is there not a way to get that information before the workflow errors out and an e-mail is sent instead?

Userlevel 6
Badge +22

Hi @csergent7,

Before we can answer your question, please let us know where you are storing the file.

Userlevel 5
Badge +15

Update: I tested this feature and it’s working as expected. 
 


@csergent7 Is your question how to restrict files from being uploaded to a start event form or task form that do not have the same file names as an associated SharePoint list item that you plan on updating (or attaching the new files to) after the form is completed? 

Userlevel 1
Badge +3

Thanks @Deon. I had a learning curve, but slowed down and re-read through it and I am able to get the name of the file. Awesome!

Reply