
Hi@MARTIN VALERO Carlota - Contractor
You also need to add a condition to limit the update of valor2
@empty(string(triggerOutputs()?['body/Valor2']))
Update item 2:
valor1:outputs('Get_item')?['body/Valor']
valor2: outputs('Get_item')?['body/Valor1']
Tendencia:
We use judgment formulas for each of the three situations, and output empty if the conditions are not met.
if(and(greater(triggerOutputs()?['body/Valor'],outputs('Get_item')?['body/Valor1']),greater(outputs('Get_item')?['body/Valor1'],outputs('Get_item')?['body/Valor2']),greater(triggerOutputs()?['body/Valor'],outputs('Get_item')?['body/Valor2'])),'Ascending',null)
if(and(less(outputs('Get_item')?['body/Valor'],outputs('Get_item')?['body/Valor1']),less(outputs('Get_item')?['body/Valor1'],outputs('Get_item')?['body/Valor2']),less(outputs('Get_item')?['body/Valor'],outputs('Get_item')?['body/Valor2'])),'Descending',null)
if(and(equals(triggerOutputs()?['body/Valor'],outputs('Get_item')?['body/Valor1']),equals(outputs('Get_item')?['body/Valor'],outputs('Get_item')?['body/Valor2'])),'Equal',null)
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