Richard Sillitto Posted July 5, 2010 Posted July 5, 2010 Hi All, I wonder if anyone can help me. I've tried to create a function that extracts a filename off the end of a filepath on a mac of the format: "RAID:Thisfolder:anotherfolder:Thefilename.pdf" I thought this should be relatively easy - using a RIGHT function, and using Position to find the last ":". But Position returns the wrong position count, and I can't see why. Any ideas? Richard.
bruceR Posted July 5, 2010 Posted July 5, 2010 Let([ p = "RAID:Thisfolder:anotherfolder:Thefilename.pdf"; plines = substitute( p; ":"; "¶"); pn = valuecount ( plines)]; getValue( plines; pn) )
Richard Sillitto Posted July 5, 2010 Author Posted July 5, 2010 That works - thanks! It's similar to a custom function I was trying to use - but didn't work. And in response to the other chap who said "such as" - I started to compose a response showing how it _didn't_ work, and then realised that my test database was working as expected. That led to more confusion for me - so sorry that I didn't get back to you directly straight away! Thanks all. Richard.
Recommended Posts
This topic is 5313 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now