Flow Designer: search for incidents that has attachments

Robby Friedrich
Giga Contributor

Dear Community.

We have a requirement to delete attachments for incidents of a certain subcategory which are older than 6 months. This is about data protection and personal data....

I have built a flow in Flow Designer (thanks to Chuck for the great tutorial).

find_real_file.png

The only thing I'm missing is a filter for incidents that have attachments, so that not all old incidents get a worknote with every run (again and again).

Does anyone have an idea how I can filter this additionally?

 

Thanks in advance!!!

1 ACCEPTED SOLUTION

OlaN
Giga Sage
Giga Sage

Hi,

Should just expand your flow to look up attachments table. see example below

find_real_file.png

View solution in original post

5 REPLIES 5

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you will have to use lookup on sys_attachment with that incident record sys_id

you are already iterating using For each there only you can use Lookup on sys_attachment

then use If activity to check if the Lookup returned count or not based on file attached to record

Regards
Ankur

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

@Robby Friedrichs 

Glad you found a correct answer. I believe I covered that above pretty well as 1st response to your question.

I didn't exactly provide the screenshots with the steps considering that you could accomplish that piece yourself as you are aware on the flow designer piece.

Otherwise, the reply marked as Correct is exactly what I said above.

You can mark only 1 response as correct.

Kindly mark the answer correct based on response given quickly and accurately.

Regards
Ankur

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

OlaN
Giga Sage
Giga Sage

Hi,

Should just expand your flow to look up attachments table. see example below

find_real_file.png

Hello Ola,

thank you very much or your answer!

Can you please expand #3 and number 4 for me? I just can't make my entries look like yours 🙂

(Sorry, it my first flow)

 

Thanks in advance

Robby