Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

How to pass trigger record sys_id from Playbook activity to Data Definition's reference qualifier

Subhash Kaushal
Tera Expert

In ServiceNow playbook, is it possible to pass the trigger record sys_id from an activity to the data definition's flow variable's advanced reference qualifier for a questionnaire activity?

 

javascript:(function() { var ids = []; var gr = new GlideRecord('sn_ti_m2m_task_observable'); gr.addQuery('task', current.getUniqueValue()); gr.addQuery('observable.type.value', 'ipv4-addr'); gr.query(); while (gr.next()) { ids.push(gr.getValue('observable')); } return 'sys_idIN' + (ids.length > 0 ? ids.join(',') : '-1'); })()

 

Here the current is not available in the reference qualifier, what is the alternate way to access trigger record sys_id? Hardcoding the sys_id works but how to take it dynamically?

#Playbook, #PAD, #Process Automation Designer

1 REPLY 1

Mark Manders
Giga Patron

Not sure (my PDI is waking up) but you could try with fd_data.trigger.current to see if that works? I'm not sure if fd_data will work in playbooks, but if not, it should have an equivalent. 


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark