Deleting a Thing in the Database inlcuding a condition

Hello everybody,
I do apologise if this question might be too simple, but I am a bit lost.
I would like do Delete a Thing based on specified conditions.
I.e on my database I have a class Product with attributes Name Price etc.
And I would like to delete only the Product that has a certain Name .
I try to do
Delete a thing → Search for Products → and then I do for ‘each items’ Name → filtered > Name contains ‘x’
It clearly says that should be only a thing rather than a List. So I believe it returns a List, despite the fact that the Name will be unique, so It will only be 1 product.
How can I achieve that?

Firstly, you’re overcomplicating things by adding an unnecessary filter… just apply the name constraint on the search itself…

So, just do a search for Products who’s Name contains X

The search will return a list (regardless of whether the list contains 0, 1 , 5 or 1000 Products) so just add :First Item to the expression, to specify the first item in the returned list.

1 Like

Thank you @adamhholmes , clearly I have a lack of logic :smiley:
I understand your solution.
What if , instead, the List returns 2 or more results? Do i Have to chose Delete a LIST of thing instead?

Yes, if you want to delete more than 1 thing, use the Delete A List Of Things action.

1 Like