Running an automation that I need help with....

I need my automation to run and check a table every 5 minutes. I have it set up as a schedule and for the table it needs to check I have this in my “Filter Condition”:

AND(
[Item_Status] = “On-Rent”,
[Category_Description] = “Pumps”,
[_THISROW].[_ComputedKey] <> [_ComputedKey]
)

I need this to then add rows to another table.

This currently adds rows to the new table, HOWEVER If the row item is already in the new table I do NOT want it to add it again. In my above expression I tried to stop that by adding:

[_THISROW].[_ComputedKey] <> [_ComputedKey]

This is not working.

It just adds the rows every time it is scheduled (every 5 minutes)

So how do I make this add NEW items/rows ONLY? In other words, if I have already added that item to the new table I do NOT want it added again.

Add another condition to check wether the item was added or not already. I use a flag column in my tables so that I can do this kind of things. Most probably you will need to add a column to be able to identify if the record was added or not already. You could also try using some SELECT() expression, although I tend to avoid that

If I am adding the value [_ComputedKey] to my “Inventory ID” column, shouldn’t my above expression work? I am still not understanding how to make it check for duplicate items.

Thanks for the help… This worked for me.

AND(
[Item_Status] = “On-Rent”,
[Category_Description] = “Pumps”,
NOT(IN([Inventory_Item_ID], SELECT(Pump AI TABLE[Inventory ID],[_THISROW].[Inventory_Item_ID] <> [Inventory ID])))
)

1 Like

Well I spoke too soon. I found out it works but work very strange. I need this to account for a column of [text] type. When I do set the column as text - it will resend data that is already in the table. If I do this as a [number] type, it will NOT add all values that are not just numbers.

Any thoughts?

Make sure that the column type of all values in the comparison are equal.
Adapt when needed. I cannot provide you with much detail because I don’t know your schema

What can I show you to help me with this? I am still having issues. I made BOTH column types in both tables the same. When they are both “Number” type - the automation does NOT send ALL rows - meaning some values are text not just numbers. However, if I change them both to “Text” type, then it seems to keep resending data to the second table without checking duplicates.