September 24, 200223 yr FTP:DOWNLOAD:FILES:VERSO:AD.JPG This is the contents typed into a field. It represents a directory path to a file. Is there a way to have a calculation that will result in showing only the last item in a path, regardless of the length of the path: AD.JPG How about a variation that shows the last two items? VERSO:AD.JPG LR
September 24, 200223 yr For the file name only: Middle(PathName, Position(PathName, ":", 1, PatternCount(PathName, ":"))+1, 64000) For the last two items: Middle(PathName, Position(PathName, ":", 1, PatternCount(PathName, ":")-1)+1, 64000)
September 24, 200223 yr Author When I tried to use the calc above I got an error: "An operator (e.g. +, -, *, ...) is expected here." The portion it highlighted for the error was Count( Any thoughts?
September 24, 200223 yr I have tested the formula, and it works. Double check your syntax to make sure you didn't miss some punctuation. Also, don't forget to replace all occurances of "PathName" with the actual name of your directory path field. And make sure that the version of Filemaker you are using uses commas as delimiters (since you are in the US, I assume it does).
Create an account or sign in to comment