Hello,
in PowerApps forms, i have a string /sites/SkoleniSFRB/Reporty/DataSP/01.jpg. I need to remove part 01.jpg so string remains.
Can please someone help me?
Thank you.
Thank you very much! That helped me. Love this community.
Regards,
Jakub
Use the method I outlined in my response, it will work regardless of the file name, or length of rest of fullpathname etc.
Yes , a few ways to achieve this - you will have to select which is the best option for you, for example if the string can end with different file names, you may need to adjust the formula accordingly.
Substitute("/sites/SkoleniSFRB/Reporty/DataSP/01.jpg", "/01.jpg", "")
Replace("/sites/SkoleniSFRB/Reporty/DataSP/01.jpg", Right("/sites/SkoleniSFRB/Reporty/DataSP/01.jpg", 6), "")
This formula uses the "Right" function to extract the last 6 characters (which is the length of "01.jpg"), and then uses the "Replace" function to replace those characters with an empty string, effectively removing them from the original string
Left("/sites/SkoleniSFRB/Reporty/DataSP/01.jpg", Len("/sites/SkoleniSFRB/Reporty/DataSP/01.jpg")-6)
This final one is good if you want to remove everything after the last "/" regardless what the text is
Concat(Split("/sites/SkoleniSFRB/Reporty/DataSP/01.jpg", "/"), "/", CountRows(Split("/sites/SkoleniSFRB/Reporty/DataSP/01.jpg", "/"))-1)
where Label10 is our string
Concat(FirstN(Split(Label10.Text,"/"),CountRows(Split(Label10.Text,"/"))-1),Result,"/")&"/"
WarrenBelz
146,731
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,079
Most Valuable Professional