- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2023 09:37 AM
Hi
Is there any way to add validation for Attachment to accept only JPG format on Record producer variable?
I have a requirement for making a variable of type file attachment.
I need to validate whether the attached file is in JPG format
Please help me.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2023 11:20 PM
Hi @Are Kaveri ,
You can create Attachment Type Variable and navigate to Type Specification Section and populate
Variable Attribute as allowed_extensions=jpeg or if you want any other extension as well you can do it like this allowed_extensions=jpeg;pdf;pptx
And then you can validate it on portal
If u try to attach attachment with other extension it will not get attached and it will give Field error msg below the field
If you attach the valid extension file
I hope it will help you
Let me know if you any questions
Please mark this comment as Correct Answer/Helpful if it helped you.
Regards,
Uday
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2023 10:03 AM
Hi,
Below link will help you achieve your requirement.
Let me know if you have further questions.
Please mark this comment as Correct Answer/Helpful if it helped you.
Cheers,
Hardit Singh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2023 09:48 PM
Hi @Community Alums ,\
the below example community link is for out of box Attachment .
In my case,
i have taken the variable of type Attachment.
variable name: Profile picture
type: Attachment
for this particular variable i need to allow only JPG format.
how can i validate this scenario?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2023 11:20 PM
Hi @Are Kaveri ,
You can create Attachment Type Variable and navigate to Type Specification Section and populate
Variable Attribute as allowed_extensions=jpeg or if you want any other extension as well you can do it like this allowed_extensions=jpeg;pdf;pptx
And then you can validate it on portal
If u try to attach attachment with other extension it will not get attached and it will give Field error msg below the field
If you attach the valid extension file
I hope it will help you
Let me know if you any questions
Please mark this comment as Correct Answer/Helpful if it helped you.
Regards,
Uday