How to add Attachment to Multi Row Variable Set
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2020 01:35 AM
Hello,
I have a requirement to add individual attachment in Multi Row Variable Set in service catalog.
We want to capture each variable data in a grid layout with attachment in service catalog. I am not sure where to start.
(for example)
Can anyone share their widget or any idea where to start?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2020 01:50 AM
Hi Kevin,
You cannot add attachment within MRVS
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2022 09:58 AM
Please find the below Link to add the attachment type of variable in the mrvs
https://community.servicenow.com/community?id=community_article&sys_id=ff89e9f51b789110c16b43f6fe4bcb02
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2023 09:04 PM
Below is the business rule restricting the attachment of multirow variables, if you want to attach attachment to associated requested item, please refer to the logic below that I have implemented on my instance and it is working as expected.
You can remove the condition from the below business rule.
Business rule Name: Restrict types for table variable set
able: Variable[item_option_new]
var grRitm = new GlideRecord('sc_req_item');
grRitm.addQuery('request', current.sys_id);
grRitm.query();
while (grRitm.next()) {
var gr1 = new GlideRecord('sc_multi_row_question_answer');
gr1.addQuery('parent_id', grRitm.sys_id);
gr1.addQuery('item_option_new', 'MRVs variable sys_id');
gr1.query();
while (gr1.next()) {
var attchment = new GlideRecord('sys_attachment');
attchment.addQuery('sys_id', gr1.value);
attchment.query();
while (attchment.next()) {
attchment.table_sys_id = grRitm.sys_id;
attchment.table_name = 'sc_req_item';
attchment.update();
}
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2024 08:32 AM
Hi,
When i try this approach, on the attachment variable i only see the string with the name of the file.
Any idea why this might be?
Thanks in advance!