If empty / else - UPSERT / INSERT MySQL and return the ID

I’ve got a workflow that should basically do this:

Set a var (a = 0)
If a = 0 already in a MySQL table: return ID
else insert a = 0 into table

The issue that I’m having with the if and empty testing via this way:

is, that I don’t have any data anymore in my items.
Any idea on how to do this in an elegant way?

Hi @Chris7935

Would it work to set this setting to always return data?


Yes, thanks.
I’m selecting one column now, have the always return data on and checking if the value is set inside an if.