Skip to main content
Nintex Community Menu Bar
Solved

Get File Name uploaded using the File Upload Control

  • July 5, 2024
  • 9 replies
  • 245 views

Forum|alt.badge.img+4

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.

 

 

Best answer by Deon

@csergent7 

 

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

 

 

9 replies

Forum|alt.badge.img+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.


Deon
Forum|alt.badge.img+10
  • Rookie
  • Answer
  • July 7, 2024

@csergent7 

 

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

 

 


Forum|alt.badge.img+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...


SimonMuntz
Nintex Employee
Forum|alt.badge.img+23
  • Nintex Employee
  • July 8, 2024

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.
 

 


Forum|alt.badge.img+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. 


Forum|alt.badge.img+4
  • Author
  • Rookie
  • July 8, 2024

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?


SimonMuntz
Nintex Employee
Forum|alt.badge.img+23
  • Nintex Employee
  • July 8, 2024

Hi @csergent7,

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


Forum|alt.badge.img+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? 


Forum|alt.badge.img+4
  • Author
  • Rookie
  • July 9, 2024

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!