Hi! I have an Outreach table that records eac...

(Jessica Buttimer) #1

Hi! I have an Outreach table that records each interaction with a contact.

The Outreach table has a reference to the Contacts table.

I would like to create a slice of the Outreach table that shows only the LAST entry for each contact. What kind of expression should I use to filter that slice?

(Suvrutt Gurjar) #2

@Jessica_Buttimer,Please try the following expression in the referenced rows option in the action.

LIST(INDEX(ORDERBY([Related Outreachs], [Outreach Date column in Outreach table], TRUE),1))

Where [Related Outreachs] is the reverse reference column in the Contacts table

(Suvrutt Gurjar) #3

The slice filter condition may be something like

[Outreach Date]=INDEX(SORT(SELECT(Outreach Table [Outreach Date],[Contact_Name]=[_THISROW].[Contact_Name]),true),1)

(Jessica Buttimer) #4

Thank you @Suvrutt_Gurjar! Worked perfectly and you saved me hours and hours.

(Jessica Buttimer) #5

@Suvrutt_Gurjar Related question, I would like to create an action for the Contacts table that executes an action on a set of Rows in the Outreach table.

However, I only want the “set” of rows to include the most recent row for that ContactID in the Outreach table.

Do I use something similar for the filter expression for the referenced rows?

I tried this and it is updating the wrong contacts :confused:


ContactID in the Outreach table is a reference to Email in the Contacts table.