- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hello people
I have a requirement to show 'Downloadable' template file under a field on a catalog form. The catch is, this file will change based on the selection or combination of selections made on two fields of type 'SelectBox'.
Variable1 has 4 choices, Variable2 has1 choices.
Example Scenario:
Variable1 -> Option A selected
Variable2 -> Option 1 selected.
So, on basis of this, respective file template should be shown under 'Upload Template'(Type is attachment). User can click on the template and get the template downloaded.
Unser Annotation of 'Upload Template' we have 'Insert/edit Link' but it remains static. We need the link to change.
I tried few ways but nothing seems to work as required.
Any idea on how to crack this? Would be helpful! 🙂
Appreciate your time and effort.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I have worked on this scenario in the past, you can implement dynamic attachments in your catalog item by using a Rich Text / HTML variable (or custom widget variable) whose content (an <a> download link pointing to a sys_attachment.do?sys_id=…) gets set via a client script triggered by changes in your select boxes, with the sys_id value returned from a GlideAjax/Script Include that queries the sys_attachment table based on those field values......
If you found my response helpful, please mark it as ‘Accept as Solution’ and ‘Helpful’. This helps other community members find the right answer more easily and supports the community.
Kaushal Kumar Jha - ServiceNow Consultant - Lets connect on Linkedin: https://www.linkedin.com/in/kaushalkrjha/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Yes, I finally cracked it. Used catalog client script with a hidden variable of type HTML.
Thanks for the responses.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@harshi_ramesh , Glad !!
Kaushal Kumar Jha - ServiceNow Consultant - Lets connect on Linkedin: https://www.linkedin.com/in/kaushalkrjha/
