Forum Discussion
List index that resets annually.
Hi GStanisic , I've run some tests and I believe it can be done if you add a couple of fields to your list( year and request number). Your Flow then uses a Get items action with the 'order by' set to (as an example) req_year desc, req_num desc, and the top count set to 1.
Next you can perform a condition action. If the integer value of req_year is less than the integer value of utcNow() formatted as yyyy it will increment by 1. You would perform similar logic on the req_num (which I've tested).
I've been able to generate incremental years and reference numbers in a single flow based off of a Form submission but not yet tried adding an item to the list (it's late here, and maybe I'll try an end-to-end tomorrow).
It definitely seems achievable from what I've tested. It's just a case of arranging the actions and logic correctly.