Compare Attachment Template with actual attachment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2023 06:34 PM
Hi Team,
We have a catalog form on which we are using a hyperlink to allow users to download an excel template.
Once downloaded the user is expected to fill the template and re attach.
Now the requirement is we would like to restrict user from attaching a different excel sheet apart from the one downloaded from the request form.
Request you to kindly suggest how I can proceed forward in this regard.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2023 06:54 PM
how do you want to find out that two different Excel files, one of which has been changed, are the "same" at the end? This question is not related to ServiceNow and to be honest I have no answer for it. However, if you find criteria which is unique enough to identify two different Excel files the same, then we can talk about a technical solution.
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2023 07:02 PM
Hi @Maik Skoddow In this case I would like to compare if the column name are the same in both the template and the attached excel file.
Based on that i would like to throw an error for the same
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2023 07:07 PM
basically that could be achieved by leveraging the GlideExcelParser API, but I cannot recommend this. All attachments reside in the same table sys_attachment. Whatever functionality you build, it will have an impact on all attachments you are uploading. The slightest error in your code could corrupt any uploaded file. And on the other hand I don't see that the benefits justify the expense.
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2023 07:16 PM
Hi @Maik Skoddow Thanks you for sharing your thoughts.