I don't know why I'm having such a hard time with this one.
We have files that are added to a OneDrive for Business shared folder. They are named in a particular naming convention. What we'd like to do is have a flow where once a file is added to this folder, a new SharePoint item is created in a list whose columns are filled out by parsing the name of the file.
The files are all named in this convention
Doe, John - 145236 - 20200101 - Anytown, AS - Jane SMITH
The column names in the SharePoint List
Name (LN, FN) - File No. - Date (yyyymmdd) - City and State - Customer
Anyone wanna give me a virtual headslap as to how I can accomplish this task? Pointer in the right direction? Anyhelp would be greatly appreciated!!
You and the Emperor...? OMG!
Please note the dark side requires the following:
1.-Mark this topic as "Solved" by clicking "Accept as a solution". THis way others facing a similar problem can find a solution faster. Please also note you can even select several responses as solution, even from different community members!
2.- (OPTIONAL) Click on 'Thumbs up' in any answer you found valuable... or even in all of them 😉
Even though this 2nd step is OPTIONAL, please remember it is the cheapest, easiest way to say thanks to somebody that spent its time simply trying to help. And just between you and me, everytime an inspiring answer receive a kudo in this community, a loyal stormtrooper escapes from the Jedis menace
Thanx for your help making this community great!
Hi!
you can add a 'Initialize variable' action block, let's call it myInputArray, type Array, assign as its value the following split() based WDL expression:
split('Doe, John - 145236 - 20200101 - Anytown, AS - Jane SMITH',' - ')
Just replace 'Doe, John - 145236 - 20200101 - Anytown, AS - Jane SMITH' and add the dynamic content value representing the filename without extension instead
Once you reexecute the flow and inspect Initialize variable output you will realize it is an array with 5 elements
[
"Doe, John",
"145236",
"20200101",
"Anytown, AS",
"Jane SMITH"
]
Now, you can grab each element from your array by means of the following WDL expressions:
variables('myInputArray')[0]
variables('myInputArray')[1]
...
variables('myInputArray')[4]
Hope this helps
Tomac
986
Moderator
stampcoin
699
Super User 2025 Season 2
Riyaz_riz11
577
Super User 2025 Season 2