Forum Discussion
Creating column
Hi Totosmsm ,
SharePoint is not build like that. Using a calculated column you can only access data from the current row.
In this case you need to create a flow.
Go to powerautomate.com and create a new automated cloud flow with the trigger "When a new item
is created or modified (SharePoint)"
Set "Site Adress" and "List name"
Add a condition with "New Code is not equal to <empty>"
In the "if yes" branch, add a SharePoint "Get Items" action with the condition
"Name eq '<Name from "When an item is created or modified">'"
TT@{items('Apply_to_each')?['Name']}000@{length(outputs('Get_items')?['body/value'])}
Add a SharePoint "Update Item" action and set the ID field to the value of ID from the "When an item is created or modified" Trigger and set the "New Code Field" to
You complete flow should look like this
Save it.
This flow will run everytime the item is saved.
If will check if the "New Code" field is empty. Then it will count all items with the corresponding name and will update the "New Code" field to your pattern
Best Regards,
Sven