How to use flow designer subflow to pull from the existing flows attachments

joshuacomeau
Tera Contributor

I have a record producer that has multiple unique attachment variable fields and upon submission it creates multiple unique child tasks and all attachments attach to the parent record. 

I am trying to figure out how to build a subflow / etc so that it will look up the attachments and based on specific variables they will copy to specific child tasks of the parent record.

 

I was thinking to look up the sys_attachment table by tablename but theirs no way to query the variablenames from this table.

 

If someone can provide steps/pictures on how this would look like in flow designer that would help a lot!

7 REPLIES 7

Mark Manders
Mega Patron

If you use a flow to handle your RITM with all attachments, you can use the 'get variables' action to get the attachments. With the 'copy attachment' action you should be able to select the correct variable that you want to copy to the task.


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

I am using a record producer that creates a custom parent request table which showcases the attachment variables,
I am using flow designer that will trigger on insert of that table and create multiple unique child tasks.

The custom child tasks only show description and short description and assignment group with not option to add or show the variables. 
I was hoping to figure out how I can use the flow action get attachments and copy attachments but it is tricky as I also need specific variable attachments to only attach to specific tasks as well:

EX: 

Variable attachment A

Variable attachment B

 

Task 1 - attach only attachment A

Task 2 - attach only attachment B

joshuacomeau
Tera Contributor

I using a custom record producer request and tasks 

the tasks are being generated by a flow that is invoked on insert of the request table 

the tasks do not include variables 

I am looking for figure out to take specific request variable attachments and attach certain attachments per unique variables to specific tasks 

Ex:

Attachment variable A 

Attachment variable B 

Task 1 = only attach A  

Task 2 = only attach B

Ankur Bawiskar
Tera Patron
Tera Patron

@joshuacomeau 

You can add that logic in the place where you are creating those specific child tasks. You can copy the attachment.

Also is it 1 to 1 mapping?

Example: 3 attachment variables A, B & C so 3 unique child tasks and each child task should have respective attachment

Please share your current flow logic which is creating child tasks

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader