I have an O365 platform, and in one of the site collections I have a document library with files that are uploaded using a standard naming convention: <Business Unit>_<ITIL Practice>_<Document Type>_<Document Description>. Examples below:
ITSM_KM_POLICY_KnowledgeManagementPolicy.docx
ITSM_CM_PROCESS_ChangeManagementProcessTemplate.pdf
ITSM_AM_PROCESS_ManagingOrganizationalAssets.pdf
ITSM_KM_GOV_KnowledgeManagementGovernanceFramework.pdf
The library has 3 managed metadata columns:
1) Business Unit
2) ITIL Process
3) Document Type
I also have a managed term store, with the following hierarchy:
Branch 1
Parent term 1: Business Unit
Child terms 1: ITSM, ITSB, ITSA
Branch 2
Parent term 2: ITIL Practice
Child terms 2: KM, CM, AM, EM
Branch 3
Parent term 3: Document Type
Child terms 3: Policy, Process, Gov, Training
I would like to set up a flow that runs whenever a file is added or modified in the library, and which compares each part of the filename with the relevant term store branch, and where it finds a match, to apply the matched term store value in the correct metadata column. Where it doesn't find a match, it leaves the value blank.
Any help would really be appreciated. Let me know if you need more information.
Solved! Go to Solution.
Hi @Anonymous ,
Where does the data of (Business Unit ,ITIL Process ,Document Type) stored, in SharePoint list or excel file?
I set the data via Compse action by myself on my side.
Then I have made a flow for your scenario, please check it for a reference.
The expression in the Compose is :
Best Regards,
Community Support Team _ Zhongys
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Could you please share a screenshot of the data in your SharePoint term store.
I am afraid there is no way to get the data (Business Unit ,ITIL Process ,Document Type)from SharePoint term store via flow currently.
1 Add the data (Business Unit ,ITIL Process ,Document Type) in an array.
2 Split the file name.
3 Check whether the file name in the array.
4 Update the file metadata.
Best Regards,
Community Support Team _ Zhongys
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Where does the data of (Business Unit ,ITIL Process ,Document Type) stored, in SharePoint list or excel file?
I set the data via Compse action by myself on my side.
Then I have made a flow for your scenario, please check it for a reference.
The expression in the Compose is :
Best Regards,
Community Support Team _ Zhongys
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks @v-zhos-msft, the logic of your flow makes sense to me and is actually super useful. However, the data of (Business Unit ,ITIL Process ,Document Type) is stored, not in a SharePoint list or excel file or hard-coded into the flow, but in the SharePoint term store. So I presume we'd need some sort of comparison clause here so that the flow:
1) Breaks down the file names into outputs
2) Searches the term store for matches to those outputs (or maybe just searches a parent term and all children, if searching over a whole term store isn't advisable)
3) When it finds a match, applies the term store value to the file properties (rather than applying a term locally\just in text form in the file properties, which would mean that we can't take advantage of SP's platform-wide reach when it comes to term stores to do things like sset up search refiners for terms when doing platform-wide searches).
4) When it doesn't find a match, leaving the column entry blank
Hi @Anonymous ,
Could you please share a screenshot of the data in your SharePoint term store.
I am afraid there is no way to get the data (Business Unit ,ITIL Process ,Document Type)from SharePoint term store via flow currently.
1 Add the data (Business Unit ,ITIL Process ,Document Type) in an array.
2 Split the file name.
3 Check whether the file name in the array.
4 Update the file metadata.
Best Regards,
Community Support Team _ Zhongys
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Did you know that you could restore a deleted flow? Check out this helpful article.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
21 | |
17 | |
11 | |
10 | |
8 |
User | Count |
---|---|
31 | |
27 | |
26 | |
17 | |
16 |