Skip to main content
Question

Count records in Table if a field has duplicate values and delete latest

  • July 1, 2025
  • 5 replies
  • 27 views

Forum|alt.badge.img+2

have a table with householdname lookup (dropdown field). is there a way to count how many records there are with the same value in that field, and if more then one, then delete the latest record (CreatedDate). Thanks

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

5 replies

Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • July 1, 2025

Hi ​@Jazzy3 

How is data being added to the Zapier Table?

If done via a Zap, then the action to use to avoid duplicates should be: Tables - Find or Create Record

 


Forum|alt.badge.img+2
  • Author
  • Beginner
  • July 1, 2025

being done by form submission. i have to create 2 separate ZAPS to update a record so i can compare two separate fields and then delete the new record that was created if it already existed. this is all being done because ZApier Interfaces cant do lookups only form submissions on Interfaces, unless i am wrong? i was looking for a way to make this more efficient. Thanks Troy

 


Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • July 1, 2025

@Jazzy3 

For us to have more context, post screenshots showing how your 2 Zap have their steps outlined.


Forum|alt.badge.img+2
  • Author
  • Beginner
  • July 15, 2025

i simplified what i was trying to do, so now i need to update the latest record of a table (records might have same household name). using Find Records (Zapier Tables) to lookup Household Names. if i return more then 1 i simply want to use the latest one (Results Old Created At). Thanks


Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • July 15, 2025

@Jazzy3 

If there can be 2+ records returned, then you will need to add a Code step logic to derive the record ID associated to the record created timestamp you want to use.

Essentially sort by the record timestamp, then pick the first option.

Zap Code steps have a built in AI Assistant to help with the code.

https://help.zapier.com/hc/en-us/articles/15666688064013-Generate-a-Code-step-using-AI-Beta

 

TIP: Try asking ChatGPT for help configuring the Zap Code logic.