Hi,
I have a SharePoint Library in where I want a number to be allocated to a document when it is uploaded. It should follow a sequence such as 0001,0002,0003, etc.
I have built something of a flow but I cannot seem to get it right?
I feel I might be missing an expression itself somewhere within the flow.
Flow as below:
Any assistance is appreciated.
Thanks.
Every item that you add to a SharePoint library will already have one of these numbers, @DrishM13.
This is because when you add a document to a library, it is actually putting it into a list. So all you need to do is get the ID that it has given that document in the list.
I'll either edit this reply with a quick 'how to' of how to retrieve and modify that into the document name/title/whatever, or reply again, dependent on other responses.
Hi @eliotcole - so I can use the ID field already from SharePoint and modify that using a flow to something specific that I want?
Can you please let me know how to do that?
Thank you.
I can try, @DrishM13 , but my attempts to demo it are hitting a snag because I'm using the 'General' folder ... and now I WANT to get that working.
Anyway ... I'll create a separate library, and do it that way, save the effort. 😅
Here you go, @DrishM13, this is with a simple document library with documents created in the main folder:
The Uri field is:
_api/web/lists/GetByTitle('fileLibraryOne')/items(@{triggerOutputs()?['body/ID']})/validateUpdateListItem
The Body field is:
{
"formValues": [
{
"FieldName": "FileLeafRef",
"FieldValue": "@{triggerOutputs()?['body/ID']} - @{triggerOutputs()?['body/{FilenameWithExtension}']}"
}
]
}
You can copy those directly into the fields if you make this yourself, replacing any renamed variances, of course. For example, you need to be sure to get the name of the library right, the easiest way to do that is to open the library, and look at the URL ... so for this one it's /sites/eliotflows/fileLibraryOne/Forms/AllItems.aspx. I just need that 'fileLibraryOne' part. Yours won't be called fileLibraryOne. 🙂
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
At the monthly call, connect with other leaders and find out how community makes your experience even better.
User | Count |
---|---|
25 | |
24 | |
23 | |
21 | |
17 |
User | Count |
---|---|
56 | |
39 | |
37 | |
30 | |
28 |