Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to use the filename of my datafile as a field however the filename is a URL as it's a webfile from SharePoint. Is there a way I can trim a field if the the result is currently like..?
/test.sp.test.com/sites/dept/it/Flat%2020File%20Repository/IT/test/Shapshots/2019-05%20Export.csv
Ideally all I want the field to show is 2019-05 but if its not possible to trim on from the right as well it doesn't matter, it just looks ugly with all the other bits in it!
You can do this using a couple of subfield() commands, to extract the text from the end of the field to the first '/', then from the start of the extracted text to the first %.
subfield(subfield(<yourfilepath>, '/', -1), '%', 1) as file_date
You can do this using a couple of subfield() commands, to extract the text from the end of the field to the first '/', then from the start of the extracted text to the first %.
subfield(subfield(<yourfilepath>, '/', -1), '%', 1) as file_date