Flagging newly created duplicate rows
Hi,
I am using a sheet to maintain incoming requests for a system access. However, in case there are multiple identical requests, I only would like to trigger the associated workflow for the request that came in first.
I have used a formula to flag all the duplicate rows but is there a way to exclude the row that came in the first from this?
Answers
-
Hi Ritika,
Do you have a Created (Date) System Column in your sheet? If so, you could potentially use the MIN function with COLLECT to flag the earliest version of the same information. In fact, we could likely build this right into your current formula that's searching for duplicates... we could have it only flag the second, third, and fourth rows, but leave the first submission un-flagged.
Then one of your conditions in the workflow could be that there is no flag for that row.
This comment has an example of how to use MIN(COLLECT within an IF statement to check a box: https://community.smartsheet.com/discussion/comment/245210#Comment_245210
Let me know if this would work for you! If you need more help building it out, it would be very useful to see a screen capture of your sheet, identifying when the workflow would run (what triggers it), but please block out any sensitive data.
Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
Hi @Genevieve P
Thank you for the help! I used the collect function with the max function instead to flag the rows that come in at a later timestamp. For your reference, in my formula, a request is considered duplicate if it has been made for the same "Requester" + "Module" + "Scope of Access" Combination.
I used the following in my sheet :
=IF([Access Requested On]@row = MAX(COLLECT([Access Requested On]:[Access Requested On], [Access Requested For]:[Access Requested For], [Access Requested For]@row, [Module Name]:[Module Name], [Module Name]@row, [Scope of Access]:[Scope of Access], [Scope of Access]@row)), 1, 0)
However, if a request comes in for the first time ever (meaning there are no duplicates), then this formula will flag that too, which is incorrect. It should only flag when there are more than 1 rows for the above combination.
Is there a way to achieve that?
Thanks
Ritika
-
Hi @Genevieve P
I think I figured this out. I am now maintaining a helper column with a count and in the above formula using a IF/AND combination to check this count to be greater than 1
Let me know if you think this sounds reasonable.
Thanks
Ritika
-
@Ritika Bhalla What about incorporating a COUNTIFS? Basically you would count how many rows match in the other columns but are less than the created column. This would solve your new entries problem.
=IF(COUNTIFS([Access Requested For]:[Access Requested For], [Access Requested For]@row, [Module Name]:[Module Name], [Module Name]@row, [Scope of Access]:[Scope of Access], [Scope of Access]@row, [Access Requested On]:[Access Requested On], @cell <= [Access Requested On]@row) > 1, 1)
-
How can I do this but to keep the newly created column only?
-
Hi @M Sanchez
Can you elaborate on what you need to do? Screen captures would be helpful, but please block out sensitive data.
Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!