HI @John_alcan
There are two ways to do this:
1. If the last is based on something you can sort, then you can use the Order By and then limit to just one record. Then delete it.
2. If not, you can fetch the items and have a condition that checks if the current item is the last one. To do this, define a variable and increment it each time the Loop runs. In each compare, if the variable is lower than the length. If it is continue, if not delete.
length(outputs('Get_items')?['body/value'])
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Cheers
Manuel
you can use length property to get length.
i.e length(body('Get_Item')).
this will give length and after we need to minus by -1 form length to get item
i.e item(body('Get_Item')['Value'][length(body('Get_Item'))-1]
HI @John_alcan
There are two ways to do this:
1. If the last is based on something you can sort, then you can use the Order By and then limit to just one record. Then delete it.
2. If not, you can fetch the items and have a condition that checks if the current item is the last one. To do this, define a variable and increment it each time the Loop runs. In each compare, if the variable is lower than the length. If it is continue, if not delete.
length(outputs('Get_items')?['body/value'])
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Cheers
Manuel
you can use length property to get length.
i.e length(body('Get_Item')).
this will give length and after we need to minus by -1 form length to get item
i.e item(body('Get_Item')['Value'][length(body('Get_Item'))-1]