I’m creating a backend workflow based on an DB trigger.
When a user changes the values in a multiselect, I want to identify the item that has been removed from the list.
The trigger works okay when creating a new item or adding to the multiselect list, it fails when I remove an item from the multiselect.
I thought I could use the following expression but it doesn’t work. "Item" = Thing Before Change's "Item" minus list Thing Now's "Item"
Any help on this would be greatly appreciated as I’ve lost 2hrs messing around with it already
Hi @rory.mulligan, this should work but maybe you are changing your thing again after the trigger has run the first time, so it runs twice and overwrites your Item.
Have you tried adding a condition on your DB trigger e.g. Before Change's "Item":count > Now's "Item":count?
Assuming you are not interested in the items being added & that Item is actually a list.
Feel free to share an editor link via PM if you need more help.
I was using a condition like you suggested but I messed up the searches as I had two instances in place.
Instance 1: if an thing is removed
Instance 2: if an thing is added
In the “Thing to change”, I had the same search in place for both but it should have been different.
For Instance 1: the search should have included the following: Item = Thing Before Change's "Item" minus list Thing Now's "Item":first item
and the condition should have been Thing Before Change's "Item":Count > Thing Now's "Item":Count
For Instance 2: the search should have included the following: Item = Thing Now's "Item":last item
and the condition should have been Thing Before Change's "Item":Count < Thing Now's "Item":Count