When Item is created in share point list,I want to generate reference Number i.e BER/ANG/001/2023. How to do that? the incremental Numbers will be 001,002,003... the others BER/ANG and Current year 2023 remains constant
Use a variable which you will increment.
You can add additional SharePoint list which will store your number.
For the year I would use Compose:
utcNow('yyyy')
so this will always give you the current year.
Auto increment value - initializing variable which will keep it:
Now we read the current value stored on a helper SharePoint list:
and we are setting varInc to the value we have on the SharePoint list.
Now it would be ok to convert it to integer (to be able to increment it):
int(variables('varInc'))
Now incrementing this value:
add(outputs('Convert_varInc_to_integer'),1)
and save (update) on SharePoint, so next runs will read the current number and add +1 with the flow run:
so now you may configure your invoices numbering as:
BER/ANG/outputs('Increment_varInc_value')/outputs('ComposeYear')
This will give you number as 1, 2, 3 and not 001, 002, 003.
Explanation and solution is here:
WarrenBelz
146,731
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,075
Most Valuable Professional