Function Field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
I would like to create a function field in the Request Item table to check for the presence or absence of attachments.
I set up the function definition as shown below to check whether a file is attached to the attachment variable.
 glidefunction:length(variables.attachment);
However, I get the error "invalid function." How can I achieve this? What value should I set in the function definition?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago - last edited 4 weeks ago
I believe simple g_form.getValue should work here.
var att = g_form.getValue('attachment_var_name');
if(att)
{
// your ogic
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
If you are looking to create function field in report designer, this is not doable. Dot walking is not supported with function fields. Attachments are created in sys_attachment table and linked to sc_req_item record when a file is uploaded as an attachment.
Refer supported functions that can be used from below link,
If this helped to answer your query, please mark it helpful & accept the solution.
Thanks,
Bhuvan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Hi @MiY ,
If you want to check if attachmentis added or not, then you can do it by different ways,
This using script include, refer this article KB0723548 - Check Attachment .
Check out this article Service Portal Catalog Items: Hide Attachment / Mandatory Attachment
Verify attachment count in service portal or native platform view
Attachment variable and making attachment with zero code ITSM Article - Attachment Mandatory/Check Attachment
Thanks,
Bhimashankar H
-------------------------------------------------------------------------------------------------
If my response points you in the right directions, please consider marking it as 'Helpful' & 'Correct'. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago