Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Removing file path from name

Featured Replies

  • Newbies

Not new to FM but fairly new to design, etc etc. A little background first:

My company has thousands of documents that we use for many different machines, accounts, etc. Currently they are in a disheveled state, mismatched etc. Documents are mostly pdf's but also some .xls and .doc files. What I am attempting to do is to setup a database to better organize these files and make it easier to find what we need. They reside on the root level of c: and it is a folder with many subfolders that contain documents. We use Copernic and/or Google Desktop to find what we need. Neither solution works very well as we get a lot of extraneous hits. My end goal would be to have a runtime solution were we could enter a find through check boxes the machine model, account, description, etc to return relevant documents.

Right now I am starting with the technical bulletins as we use them the most. I have created a table with the following fields: Document Title; Document Type (TI Bulletin, Service Manual, Parts Manual drop down list) ; Machine Type; Account; Document (Container); Keywords, and Context. I want to use the container to store references to the files so that a double click opens them without the need to export. I also assume that this will keep the solutions overall file size as well as the index easily managed. To make the initial data entry easier and to facilitate the ongoing onslaught of new documents I set up the Document Title to refer via a simple calculation to the Document field for its name. When the file is stored within FM this works fine but when stored as a reference I get "file:TI Bulletins/ED/ED017 - LP1000 - CUT SORT PUNCH PIN BREAKAGE COUNTERMEASURE.pdf" Is there a way to remove everything to the left of the last "/" so that my Document name would read "ED017 - LP1000 - CUT SORT PUNCH PIN BREAKAGE COUNTERMEASURE.pdf"? The file path will change as far as different subfolders etc. but everything after the last "/" I would like to have as the document title.

The Context field I am using for text. I have used a script to extract text from the files and have pasted it into each one. I am doing this so that the contents of the container are indexed for content searching. Any issues foreseeable with this?

When the file is stored within FM this works fine but when stored as a reference I get "file:TI Bulletins/ED/ED017 - LP1000 - CUT SORT PUNCH PIN BREAKAGE COUNTERMEASURE.pdf"

That's not ALL you get: there should also be a second line containing the absolute path to the file.

Try =

Let ( [

path = GetValue ( ContainerField ; 1 ) ;

len = Length ( path ) ; 

pos =  Position ( path ; "/" ; len ;  -1 ) 

] ;

Right ( path ; len - pos )

)

  • Author
  • Newbies

That's not ALL you get: there should also be a second line containing the absolute path to the file.

Try =

Let ( [

path = GetValue ( ContainerField ; 1 ) ;

len = Length ( path ) ; 

pos =  Position ( path ; "/" ; len ;  -1 ) 

] ;

Right ( path ; len - pos )

)

Thank You worked great, just what I needed. Know of any in depth books on advanced scripting/calculations on FileMaker? I got the basics down as far as design and layout but realize my limitations now that I started this project. Thanks again.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.