hi, I need to split a string in Flow at the 6th '/' and delete everything after that, keeping everying before that.
e.g. i have a string such as this https://mysharepount.sharepoint.com/sites/SA/SalesOrders/015300%20to%20015399/015328/Folder%20for%20...
and i want to delete everything from the word "Folder" onwards, leaving everyting before it
any help would be much appreciated
Solved! Go to Solution.
Hi @StephenM,
Do you want to keep everything before “Folder”?
Please take the following code for a reference.
In Compose, use the function lastIndexOf to return the ending position of the string.
lastIndexOf(triggerBody()['text'],'Folder')
In Compose2, use the following code to remove the characters after the “Folder”.
substring(triggerBody()['text'],0,add(outputs('Compose'),6))
The Output of Compose 2 is:
https://mysharepount.sharepoint.com/sites/SA/SalesOrders/015300%20to%20015399/015328/Folder
Please take it for a reference and try it on your side.
Best regards,
Mabel Mao
Hey, @StephenM!
Thank you for posting to the Flow Community Forum! It appears you have found a solution to your issue! If you feel as though your issue has been solved and you are satisfied with one of the previous replies, please click "Accept as Solution" so that this thread will be marked for other users to easily identify!
Thank you for being an active member of the Flow Community!
-Gabriel
Flow Community Manager
Hi @StephenM,
Do you want to keep everything before “Folder”?
Please take the following code for a reference.
In Compose, use the function lastIndexOf to return the ending position of the string.
lastIndexOf(triggerBody()['text'],'Folder')
In Compose2, use the following code to remove the characters after the “Folder”.
substring(triggerBody()['text'],0,add(outputs('Compose'),6))
The Output of Compose 2 is:
https://mysharepount.sharepoint.com/sites/SA/SalesOrders/015300%20to%20015399/015328/Folder
Please take it for a reference and try it on your side.
Best regards,
Mabel Mao
Awesome. thanks !!
Hey, @StephenM!
Thank you for posting to the Flow Community Forum! It appears you have found a solution to your issue! If you feel as though your issue has been solved and you are satisfied with one of the previous replies, please click "Accept as Solution" so that this thread will be marked for other users to easily identify!
Thank you for being an active member of the Flow Community!
-Gabriel
Flow Community Manager
Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.
User | Count |
---|---|
91 | |
58 | |
42 | |
39 | |
37 |
User | Count |
---|---|
84 | |
72 | |
56 | |
56 | |
43 |