outputs('Compose')
if(
equals(
outputs('Compose-ChangePriority')['name'],
item()['name']
),
setProperty(
item(),
'priority',
if(
less(
outputs('Compose-ChangePriority')['priority'],
item()['priority']
),
sub(
outputs('Compose-ChangePriority')['priority'],
0.1
),
add(
outputs('Compose-ChangePriority')['priority'],
0.1
)
)
),
setProperty(
item(),
'priority',
float(
item()['priority']
)
)
)
range(0, length(body('Select-TmpPriority')))
setProperty(
sort(body('Select-TmpPriority'), 'priority')[item()],
'priority',
add(item(), 1)
)
Add an Initialize Variable action to store the updated item's ID:
UpdatedItemID
ID
(Dynamic content from the trigger).Add another Initialize Variable action to store the updated item's new priority:
NewPriority
Priority
(Dynamic content from the trigger).Condition to Skip the Updated Item:
items('Apply_to_each')?['ID']
is not equal to variables('UpdatedItemID')
.Determine the New Priority:
Add a Condition:
items('Apply_to_each')?['Priority'] >= variables('NewPriority')
.If True:
items('Apply_to_each')?['Priority'] + 1
.NewPriority
).------------------------------------------------
⭐ If this was helpful, please like and mark as a verified answer to help others find this too!
Always glad to help! 💯💯💯💯💯
Tom
Follow me on LinkedIn - Thomas Rice, PMP | LinkedIn