Jump to content

This topic is 8166 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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)

Posted

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?

Posted

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).

This topic is 8166 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.