Hello ,
I am running a flow against a selected item and after getting file properties as below ,will send an approval request.
Above my full path is like this < /LibraryName/Foldername> , i want to remove the first 16 characters and only send /Foldername in the approval request..
Any help would be valuable.. thanks you
Solved! Go to Solution.
Click into the field where you want the data to go and click on the expression editor:
Paste it in there. I might be easier for you at this stage to put it in a compose step before the action you want to use it in so you can examine the output.
Use this expression:
substring(outputs('Compose'), lastIndexOf(outputs('Compose'), '/'))
replace outputs('Compose') with your "Folder Path" dynamic content.
Please...
If I answered your question Accept it as a solution ✔️
If I helped you out, please give me some Kudos 👍
Thanks 😙
We are getting the above error
Try this, it is hard to give you the exact expression unless you post the exact output of your Get File Properties action from the run history:
substring(outputs('Get_file_properties')?['body/{Path}'], IndexOf(outputs('Get_file_properties')?['body/{Path}'], '/'))
or if you just want to get rid of the first X characters as you said originally you can just do:
substring(outputs('Get_file_properties')?['body/{Path}'], 12)
This will get everything after the 12th character, change the number to suit your results.
I will attach the get file properites
Did you try the expressions I gave you?
Yes ,
Its working but not perfect as its only returning the last part ..
I only want to trim the first Part of the folder path
example : sales_library/Contract/Tender
Here i need to retrun : </contract/Tender >
example 2 : Sales_library/Purchase/Delivery
Expected : /Purchase/Delivery
Then this should be what you need:
substring(outputs('Get_file_properties')?['body/{Path}'], IndexOf(outputs('Get_file_properties')?['body/{Path}'], '/'))
Everything after the first / symbol
How to declare this expression, ?
Click into the field where you want the data to go and click on the expression editor:
Paste it in there. I might be easier for you at this stage to put it in a compose step before the action you want to use it in so you can examine the output.
This is filtering the path rightly but is it possible to add the file name also with the filter
example : <sale_li/Customer/Tender/docsksjsu02.pdf>
User | Count |
---|---|
92 | |
45 | |
20 | |
19 | |
17 |
User | Count |
---|---|
143 | |
51 | |
42 | |
40 | |
31 |