I'm sure this has been done many many times before and fairly simple but i need a bit of a hand to finish this. I'm very Noob to power automate but now want to do everything with it! SO much time saving potential on small things like this...
I've a filename ex. 0056-KAS-V1-01-A-DR-0111-GA Plan.pdf
This is a standard format and is always the same structure.
I want to split the name by '-' delimiter and put those values into different columns of the file metadata
So start with a "when file is created or modifies (properties only)" trigger
Then use Split(string(triggerBody()?['file']?['name']),'-')
To give me an array of the '-' separated string
Then a series of variables to identify those array strings
How do I get the elements of the array, via index I presume? outputs, outputs etc...? Basic I know...
I tried outputs('Compose')
but computer says no!
Then I Feed these variable into the update file properties action right?
And that should be it right.
Will there be an infinite loop as the trigger looks for metadata changes and the result is a metadata change?
Ultimately some of these variables will be Store terms but that's another disco.
Hello @Wildtypitch ,
you don't need special variable for each part of the file name, you can repeat the split(...) expression for each of the metadata and just add the index at the end.
Split(string(triggerBody()?['file']?['name']),'-') Split(string(triggerBody()?['file']?['name']),'-') Split(string(triggerBody()?['file']?['name']),'-')
And yes, if your flow is triggered on file update then updating the file will trigger the flow again = infinite loop risk. The metadata update from file name seems to me like a one-time action, maybe you could use the trigger 'When a file is created' instead of handling the infinite trigger loop.
Hi I went with
Hello @Wildtypitch ,
there're some ways to avoid the looping based on the metadata:
It would be the updating flow + 1 extra flow triggered by the update, but the extra flow would not update anything = no loop.
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.
If you are a small business ISV/Reseller, share your thoughts with our research team.