July 5, 201015 yr 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.
July 5, 201015 yr Let([ p = "RAID:Thisfolder:anotherfolder:Thefilename.pdf"; plines = substitute( p; ":"; "¶"); pn = valuecount ( plines)]; getValue( plines; pn) )
July 5, 201015 yr Author 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.
Create an account or sign in to comment