HI @ MARTIN VALERO Carlota - Contractor
Here is a test for your reference:
Here is list
Here is flow
add(triggerOutputs()?['body/ID'],-1)
if(equals(triggerOutputs()?['body/Value'],outputs('Get_item')?['body/Value']),'EQUAL',if(greater(triggerOutputs()?['body/Value'],outputs('Get_item')?['body/Value']),'ASCENDENTE','DESCENDENTE'))
Here is test result:
ASCENDENTE
EQUAL:
DESCENDENTE
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best Regards
Cheng Feng