Action to Delete Duplicate Row

Hi, I am currently trying to create a conditional expression for an action to delete a row.

  • Condition: Most recent Date, Time, Employee, Total = Any previously recorded Date, Time, Employee, Total. Must be a duplicate in all the above columns, not just a duplicate of for example Employee, as there are multiple entries from the same employee.

(Table has reference to most recent based on timestamp)

The action is set to be executed by a bot every time a new record is added to the table, I'm stuck trying to write this expression.

Solved Solved
0 4 372
1 ACCEPTED SOLUTION

I made a [Debug] column that is a concatenation of [Date] [Employee] [Shift] [Count Type] & [Total].

In([Debug], Select(Register[Debug], [Row ID] <> [_thisrow].[Row ID]))

This works.

I am struggling with AND() it doesn't want to work โค๏ธ but I'd imagine it would work if you intended to check each column- I just made a work around.

View solution in original post

4 REPLIES 4

AND(

 

IN(EXTRACT("CHOICE",[MostRecent].[Employee]), LIST(EXTRACT("CHOICE",[Employee])))

,

IN(EXTRACT("CHOICE",[MostRecent].[Shift]), LIST(EXTRACT("CHOICE",[Shift])))

,

IN(EXTRACT("DATES",[Date]), LIST(EXTRACT("DATES",[Date])))

 

)

 

This is what I have come up with but for some reason the date absolutely will not work.

The date formula actually crashes the entire app but it makes no sense because it's written identical to shift & employee both of which work.

I made a [Debug] column that is a concatenation of [Date] [Employee] [Shift] [Count Type] & [Total].

In([Debug], Select(Register[Debug], [Row ID] <> [_thisrow].[Row ID]))

This works.

I am struggling with AND() it doesn't want to work โค๏ธ but I'd imagine it would work if you intended to check each column- I just made a work around.

AND(

In([Date], Select(Register[Date], [Row ID] <> [_thisrow].[Row ID])),

In([Shift], Select(Register[Shift], [Row ID] <> [_thisrow].[Row ID])),

In([Count Type], Select(Register[Count Type], [Row ID] <> [_thisrow].[Row ID])),

In([Employee], Select(Register[Employee], [Row ID] <> [_thisrow].[Row ID])),

In([Total], Select(Register[Total], [Row ID] <> [_thisrow].[Row ID]))

)

 

 

Top Labels in this Space