Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Attachment reference field

Kristoffer Mon1
Giga Expert

Hi All,

find_real_file.png

 

I've searched the forums and found that others are using a Script include to achieve what i'm trying to accomplish; which is create a field that references the "sys_attachment" table, but limits attachments attached to that record.

If need be, i will use the script include method, but i'm not sure why this problem could not be solved simply without creating a new script include.

Now in the above screenshot, when I hardcode the sys_id condition, I get back the expected results; attachments attached to that particular record.

But when I add the following script, i'm not able return a list of attachments:

javascript: current.sys_id;

 

If you a moment, would appreciate some insight as to why this method doesn't work.

 

 

1 ACCEPTED SOLUTION

Mike Patel
Tera Sage

try 

javascript:"table_sys_id="+ current.sys_id;

View solution in original post

2 REPLIES 2

Mike Patel
Tera Sage

try 

javascript:"table_sys_id="+ current.sys_id;

Hi Mike,

 

That worked!

I tried adding your solution to the simple condition above, but what ultimately worked was to use the advanced option.

 

find_real_file.png