Hi all,
Just wondering if anyone can help. I am trying to create an expression that will remove the file extension from the end of a file URL, as an example if the URL field being parsed is: 'https://mytenant.sharepoint.com/sites/sitecol/doclib/filename.ext' I would want to remove '.ext'.
I know I can use the replace expression but the URL's are going to constantly change as these are coming from a SharePoint list therefore I need to write an expression, as an example I have the following:
substring(triggerOutputs()?['body/FileRelativeUrl'], lastIndexOf(triggerOutputs()?['body/FileRelativeUrl'], '.'), sub(length(triggerOutputs()?['body/FileRelativeUrl']), lastIndexOf(triggerOutputs()?['body/FileRelativeUrl'], '.')))
However this is returning '.ext' instead of the start of the url as I require, how do I get the start of the URL instead.
Any help is appreciated.
Solved! Go to Solution.
I think you want:
substring(triggerOutputs()?['body/FileRelativeUrl'], 0, lastIndexOf(triggerOutputs()?['body/FileRelativeUrl'], '.'))
I think you want:
substring(triggerOutputs()?['body/FileRelativeUrl'], 0, lastIndexOf(triggerOutputs()?['body/FileRelativeUrl'], '.'))
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
63 | |
51 | |
30 | |
29 | |
24 |