I didn't see the issue at first, but the -1 is just fine. It's the starting postion of 1 that's the problem. The position function doesn't "wrap around" back to the the end of the string.
let ( p = get ( FilePath ) ; Position ( p ; "/" ; length ( p ) ; -1 ) )
Oh, ok. Thanks. The functions manual doesn't really make that clear, and actually seems to imply otherwise.
Where exactly did you see text that "seems to imply otherwise"? Don't want to argue, but if we can spot a place that is not clearly worded, we can point this out to FileMaker and maybe they will clean it up in the next version.
I'm looking at the FileMaker 11 functions reference for Position and don't see anything that I find that implies using 1 ast the starting position with a negative occurrence. I even can find and example of Position with a negative occurrence that uses the Length function to set the starting position.
For me, the fact that it doesn't specifically state that the function doesn't wrap around when it's talking about using negative occurrence numbers means that it's possible that it does. There's no specific quote that gave me that idea in the text though.
The fact that it won't wrap around makes total sense to me after the fact, but between being tired and working on Filemaker all morning it wasn't apparent in the moment.
Might not be a problem anyone else might ever have...