0

New to Sharepoint and couldn't quite figure this problem out.

I'm trying to create a ticketing system where the numbering is incremental, but the number needs to reset to 1 whenever the fiscal year changes.

I have two columns: one with the Fiscal Year and one with the Ticket ID Number.

The numbers should only increase by 1 with every new item created. But the number should change back to 1 if the year is different.

If there's a way to do this with Power Automate, that would really be helpful!

enter image description here

0

Here is another option you can try. As I assume the fiscal year will be ordered in time order. So I made a sample flow which will get the item before the newly created one.

If the new item has the same fiscal year with the last one, it will update the id by the last id+1.

If they fiscal year is greater than the last one, the ID will be set to 1.

It works for simple use and you can take it as a reference. enter image description here enter image description here

| improve this answer | |
  • THANK YOU! This worked perfectly! – JTab Jun 25 at 2:24
  • @JTab, Glad to be helpful. Just a notice, this flow is quite simple and do not have actions to handle error values which may be filled by end users by mistake. You may need to pay attention to that part. – Jerry_MSFT Jun 25 at 2:29
  • Thank you! I did experience some errors when I tried the flow with a bunch of test data, but I think I've managed to put in enough corrective actions. Thanks so much again! – JTab Jun 26 at 4:41
0

May be you can use REST API with Power Automate to fetch the number of list items coming under a particular FiscalYear and update the count+1 value into your IDNumber field. Reference

You can use the filter query like below

/_api/web/lists/getbytitle('<List Name>')/items?$select=Id&$filter=<Fiscal Year Column> eq <Fiscal Year Value>

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.