cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
benidoink
Helper II
Helper II

Remove user names on uploading files

Hi Guys,

I use MS Forms to upload files and Power Automate to move the file from the Forms database which is OneDrive to Sharepoint Site. It works very well my question is that there is a chance to remove user names on uploading files? See below the screenshot from my SharePoint site, looking at the picture, the file name becomes "Sample Scan (100,ppi)_Benedick Divinaflor" it should be "Sample Scan (100,ppi)" ". 
Lastly, we upload multiple files per Form.

benidoink_0-1630595720014.png
Here's my Flow, if you notice on the File Name under Created File, I am using Parse JSON to get the file name. 

benidoink_1-1630596346421.png

And here's my Parse JSON schema I used.

{
    "type""array",
    "items": {
        "type""object",
        "properties": {
            "name": {
                "type""string"
            },
            "link": {
                "type""string"
            },
            "id": {
                "type""string"
            },
            "type": {},
            "size": {
                "type""integer"
            },
            "referenceId": {
                "type""string"
            },
            "driveId": {
                "type""string"
            },
            "status": {
                "type""integer"
            },
            "uploadSessionUrl": {}
        },
        "required": [
            "name",
            "link",
            "id",
            "type",
            "size",
            "referenceId",
            "driveId",
            "status",
            "uploadSessionUrl"
        ]
    }
}

 

1 ACCEPTED SOLUTION

Accepted Solutions
ekarim2020
Super User
Super User

Here is an expression that might do the trick:

ekarim2020_0-1630599115180.png

concat(first(split(outputs('name'),'_')),'.',Last(split(last(split(outputs('name'),'_')),'.')))

ekarim2020_1-1630599208974.png

Ellis

 

View solution in original post

3 REPLIES 3
ekarim2020
Super User
Super User

Here is an expression that might do the trick:

ekarim2020_0-1630599115180.png

concat(first(split(outputs('name'),'_')),'.',Last(split(last(split(outputs('name'),'_')),'.')))

ekarim2020_1-1630599208974.png

Ellis

 

benidoink
Helper II
Helper II

Hi @ekarim2020 

It worked sir. thank you so much 🙂

ekarim2020
Super User
Super User

In case anyone is interested, a breakdown of the expression:

ekarim2020_0-1630602489405.png

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (3,914)