A single Bot to trigger on creation OR change

I often find that I want a bot to trigger on both newly created records and/pr when a specific column changes.  The former can be done by choosing "Adds" or "Adds and Updates".  The later by using [_THISROW_BEFORE].[ColumnName] <> [_THISROW_AFTER].[ColumnName].

The issue I'm wondering about is can I combine both of these into one bot?  Since I'm sure in the past I've used "Adds and Updates" with [_THISROW_BEFORE].[ColumnName] <> [_THISROW_AFTER].[ColumnName] but it didnt trigger on Adds because as far as the bot is concerned [ColumnName] was created but it didn't change.

Solved Solved
0 12 1,650
1 ACCEPTED SOLUTION

I would try below,

Enable "Adds and Updates"

In the bot condition , I would try

IF ( IN ([Key Column], Table_Name[Key Column]),

[_THISROW_BEFORE].[ColumnName] <> [_THISROW_AFTER].[ColumnName],

TRUE)

This will mean if the row exists in the table , the expression will go through the 

[_THISROW_BEFORE].[ColumnName] <> [_THISROW_AFTER].[ColumnName]

part.

If the row is being newly added ,the expression will simply evaluate to TRUE , effectively ignoring [_THISROW_BEFORE]..... [_THISROW_AFTER] part.

 

View solution in original post

12 REPLIES 12
Top Labels in this Space