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

Exclude Records From Look Up Records Action in Flow Designer

cwolfe01
Giga Guru

Hi all,

 

In my flow, I'm looking up incident records that meet the following conditions:

Screenshot 2023-12-05 103356.png

 

How would I make it so incident records that have been commented on within the last 30 days are not included in this action? I'm thinking I need to include an additional condition where Updated is less than 30 days after the Created field.

1 ACCEPTED SOLUTION

Hi there,

 

I ended up adding a condition where Updates is less than 2, and that seems to do exactly what I'm wanting. It's probably also a better solution because this method will keep track on all updates to the record, not just when someone leaves a comment.

Screenshot 2023-12-05 135726.png

View solution in original post

3 REPLIES 3

Maik Skoddow
Tera Patron
Tera Patron

 Hi @cwolfe01 

 

I'm not sure whether this is a good approach as comments are stored at table sys_journal_field and a update can also happen in many different other ways.

 

My recommendation is to create a database view between the incident and the sys_journal_field table and use this for your lookup.

 

This could be the join definition for the database view:

 

MaikSkoddow_0-1701792142333.png

 

Maik

Hi there,

 

I ended up adding a condition where Updates is less than 2, and that seems to do exactly what I'm wanting. It's probably also a better solution because this method will keep track on all updates to the record, not just when someone leaves a comment.

Screenshot 2023-12-05 135726.png

Marco0o1
Tera Sage

Hi @cwolfe01 ,

 

The comments are stored in the ys_journal_field table with the table and teh sys_id of the record, when you have the list of record just make sure dont have a record in the last 30 days:

 

Marco0o1_0-1701794911652.png

 

Marco0o1_2-1701794974274.png

 

The inside the if make sure you do your custom action.

 

Hope that help you.