I am writing a flow that if someone changes a "status" column a second "priority" column will subtract 1 from the current value. I am using the expression:
sub(outputs('Update_item_2')?['body/on0o'],1)
and it works, however I don't want to to go below zero.
I tried this, but it says my expression is invalid
if(triggerOutputs()?['body/on0o']>0,(sub(triggerOutputs()?['body/on0o'],1)),)
Any suggestions?