Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Attachment Variable Causing Duplicate Attachments on Record Producer Submission

Mahnoor_Azhar
Giga Expert

Hi everyone,

I'm working with a Record Producer where I've added an Attachment variable to allow users to upload files.

However, when users upload files through this variable and submit the form, the attachments show up twice on the target record.

Has anyone else faced this issue?

What I’ve observed:

  • I'm not using the paperclip icon to upload files — only the Attachment variable.

  • But still, attachments are appearing twice on the created record.

What I need help with:

  • Why is this duplication happening?

  • Is there a way to use the Attachment variable without triggering duplicate attachments?

  • Should I disable the paperclip icon, or is there a better approach?

Any suggestions or best practices would be greatly appreciated!

1 ACCEPTED SOLUTION

Its_Azar
Tera Guru
Tera Guru

Hi there @Mahnoor_Azhar 

try disabling the default attachment option on the Record Producer by unchecking "Add attachment" in the configuration. If that’s not possible, a post-submission script (like a BR) can be used to identify and remove duplicate files by comparing attributes like file name or size.

 

If this helps kindly accept the solution thanks.

☑️ If this helped, please mark it as Helpful or Accept Solution so others can find the answer too.

Kind Regards,

Mohamed Azarudeen Z

Developer @ KPMG

View solution in original post

5 REPLIES 5

Its_Azar
Tera Guru
Tera Guru

Hi there @Mahnoor_Azhar 

try disabling the default attachment option on the Record Producer by unchecking "Add attachment" in the configuration. If that’s not possible, a post-submission script (like a BR) can be used to identify and remove duplicate files by comparing attributes like file name or size.

 

If this helps kindly accept the solution thanks.

☑️ If this helped, please mark it as Helpful or Accept Solution so others can find the answer too.

Kind Regards,

Mohamed Azarudeen Z

Developer @ KPMG