cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TomTT
Helper I
Helper I

Naming convention for document in a sharepoint library

Bildschirmfoto 2021-05-11 um 08.07.01.png

 

Hi I have a challenge for image documents in a sharepoint library that I want to solve with Powerautomate.

 

However, I am not sure if this will work at all.

 

The name of the document is structured as follows

Item_number_color_number_photo_view_number.jpg

7 digits_5 digits_1-2 digits.jpg

 

Means:

Item number = 7-digits and underscore.

color number = 5 digits and underscore

Photo view number = 1-2 digits and .jpg

The photo view number is limited to the following numbers: 7, 8, 26, 27, 28, 29, 30

Most errors happen when uploading images because either too many underscores, too many periods, spaces, letters, or hyphens are used.

Examples:

1029077_10668 - 27.jpg (error: space and hyphen)

1029077_10668__27.jpg (Error: 2 hyphens in a row, in sum 3, allowed are 2)

1029077_10668.27.jpg (Error: wrong punctuation, missing underscore)

1029077_10668_28b.jpg (Error: bush letter in photo view number, may only be 2 digits, no letters)

If you could basically deposit the rule that there must be exactly 2 underscores, 1 dot and only numbers (except for jpg), we would be helped a lot 😊

For a naming rule, I would like to set up a status column to indicate correctness. (Checkmark or warning triangle). In addition, an email should go to the person who made a wrong upload Best case, the user comes through a link in the email then directly into the folder where the wrong file is located? If not, a normal email with the note that the file XY is incorrect is also sufficient.

 

I would be pleased about a solution approach with Powerautomate

1 ACCEPTED SOLUTION

Accepted Solutions
annajhaveri
Super User
Super User

@TomTT  for this case Regex would be the perfect solution to validate the file name, however Regex is not available by any builtin connectors of flow. So you will have to use any third party connectors or create a custom connector as described in this blog https://mikefactorial.com/2020/10/15/create-a-regular-expression-validator-for-microsoft-flow-2/ to perfectly validate the file name as per your requirements.

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

View solution in original post

1 REPLY 1
annajhaveri
Super User
Super User

@TomTT  for this case Regex would be the perfect solution to validate the file name, however Regex is not available by any builtin connectors of flow. So you will have to use any third party connectors or create a custom connector as described in this blog https://mikefactorial.com/2020/10/15/create-a-regular-expression-validator-for-microsoft-flow-2/ to perfectly validate the file name as per your requirements.

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

View solution in original post

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,606)