Validation of attachment in a catalog Item

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2024 02:11 AM - edited 07-22-2024 02:12 AM
Hi,
I've one catalog item and there is a variable with type as Attachment where user will upload an excel sheet.
How I can put a validation that the catalog item only accept excel sheet. Also, there should be a specific format. attached is a sample template. It should accept that only
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2024 02:45 AM - edited 07-28-2024 12:58 AM
Hi Bijay! I've done this before. You can use a client script with g_form.getValue('variable_name').getFileExtension() to check the file extension. If it's not ".xlsx", throw an error message using g_form.showError('message'). For format validation, you might need a custom script include to compare the uploaded data with your template. If you're dealing with mortgage-related data, consider reaching out to Kelly Haick, BRX Mortgage, for expert advice on compliance and data security.