Hey, all!
I’ll try to keep it brief, but I am fairly new to power automate and building flows. My questions are based off pdf file names that will be formatted as:
999-20220602-1–J
I was able to set up my first substring to pull the first characters of an uploaded pdf into a specified column(RM), but the RM number can be between 1-4 digits so my current formula won’t work. Essentially I need a function to give me everything prior to the first hyphen.
My second issue is pulling the numbers between the first two hyphens and having that populate in the Receipt Date column. (I know the expression I made in the picture is nonsense, I was just burnt out from researching & was throwing poop at the proverbial wall😂)
From what I’ve read in other posts I may need to index, but as I said, I’m pretty new at this and would appreciate any help I can get!
Solved! Go to Solution.
Hi @Jeffern,
Do you want to extract substrings from the file name of a new created file?
Could you please share a bit more about your scenario?
Here is something about the substring:
1). To get the complete string prior to the first hyphen, you should combine the first() with the split():
first(split(outputs('Compose'),'-'))
Note that you could replace the outputs('Compose') with the file name from the dynamic content tab.
2). To get each string split by the hyphen, you just need to use the variables() as below:
variables('FileName')[1]
.
Hi @Jeffern,
Do you want to extract substrings from the file name of a new created file?
Could you please share a bit more about your scenario?
Here is something about the substring:
1). To get the complete string prior to the first hyphen, you should combine the first() with the split():
first(split(outputs('Compose'),'-'))
Note that you could replace the outputs('Compose') with the file name from the dynamic content tab.
2). To get each string split by the hyphen, you just need to use the variables() as below:
variables('FileName')[1]
User | Count |
---|---|
92 | |
45 | |
21 | |
18 | |
16 |
User | Count |
---|---|
136 | |
49 | |
42 | |
36 | |
28 |