The CreatorCon Call for Content is officially open! Get started here.

Flow - Run Transform inside of a URL Link

BehelCS
Tera Expert

There is a flow in our instance that uses some form of Flow Transform to attach the record of a lookup action into a URL link on the description of a task.

So basically, there's a lookup step for finding a document attached to a previous task. Then on the next step, it updates the current record to add that attachment into the description of the task using a link but we are having trouble interpreting what it means. We are trying to replicate a similar action and would like to be consistent in how this all works.

 

The task getting updated:

BehelCS_0-1682440287068.png

The link:

BehelCS_1-1682440338113.png

The whole link with x's at the end in case the string ends up being something sensitive: /sys_attachment.do?sys_id={{fd_transform:bf72c021-7466-4b65-ad2b-xxxxxxxxxxxx}}

 

I vaguely understand transforms but I've never seen one that like. And we cant figure out where that string is pulled from. Is it the sys_id of the previous action? Any insight would be greatly appreciated!

1 ACCEPTED SOLUTION

So we figured it out. The "fd_transform:bf72c021..." was pulled from the html code generated by the system when a data pill from the lookup step was pulled into the Description box. So you can pull in the data pill, use the source code to get the value of the data pill you just pulled in, and then insert that value into the link and the system knows what to do from there. 

It threw us off because if you pull in the data pill multiple times, you get different values so we couldn't replicate the exact value we were seeing. But it seems to be the value of the transform that whoever built it originally used so the system still understands what its supposed to do even after deletion. Neat trick

View solution in original post

3 REPLIES 3

Punit S
Giga Guru

Based on the information you provided, it seems like the Flow Transform in question is using a unique identifier, called sys_id, to generate a URL that links to a document attachment associated with a previous task.

The sys_id is a unique identifier assigned to each record in the ServiceNow platform, including tasks and attachments. It is possible that the sys_id referenced in the URL is the sys_id of the document attachment associated with the previous task. This would allow the URL to dynamically link to the specific document attachment without requiring any manual updates.

To confirm whether the sys_id in the URL corresponds to the document attachment's sys_id, you can locate the previous task that was used in the lookup step of the flow and check its attachments. The sys_id of the attachment should match the sys_id referenced in the URL.

As for the fd_transform prefix in the URL, it is likely a custom Flow Designer transform that was created to dynamically generate the URL based on the sys_id value. The transform could be using JavaScript or another scripting language to generate the URL string.

I hope this information helps you in replicating a similar action in your instance. 

 

Please mark my answer as a solution/helpful in case it adds value and moves you a step closer to your desired ServiceNow solution goal.

Thanks,
Punit

So we figured it out. The "fd_transform:bf72c021..." was pulled from the html code generated by the system when a data pill from the lookup step was pulled into the Description box. So you can pull in the data pill, use the source code to get the value of the data pill you just pulled in, and then insert that value into the link and the system knows what to do from there. 

It threw us off because if you pull in the data pill multiple times, you get different values so we couldn't replicate the exact value we were seeing. But it seems to be the value of the transform that whoever built it originally used so the system still understands what its supposed to do even after deletion. Neat trick

Hello.
I want to know how to obtain the sys id?
bf72c021-7466-4b65-ad2b-xxxxxxxxxxxx}}