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.

Search in text

Featured Replies

Hi,

I'm having a field which has file path's seperated by "return characters". I'd like to extract the actual filenames, so everything in between a "/" and a return character. Is there a function that can do this?

Thanks

Robin

Hi Robin,

Try this in a new calculation field

Right ( [color:red]Text ; Length ( [color:red]Text ) - Position ( [color:red]Text ; "/" ; 1 ; 1 ) )

Substitute your field for [color:red]Text.

HTG

Lee

  • Author

Thanks, but how can I do this with different file paths, this will only work for the first one, right?

Thanks

I'm confused by what you are looking for here.

Is this a field in your file, then the calculation will show on each record.

Are you importing records, and this is part of a larger text file?

More detail on what you have now, and what you are trying to obtain will be helpful.

Lee

How many are there (or can be)?

  • Author

Hi,

It's for attachments, different attachments will be used with a "return character" in between, so I need to check for the return characters, put the different in soms sort of array (if this would be possible in FM) and then print the last characters of each line before the /, does anyone have an idea?

Thanks

Robin

  • Author

And there can be as much as 10.

Thanks

Robin

If the number is not constant, a recursive calculation is required - so either a custom function, or a repeating calculation field, or a script.

print the last characters of each line before the /

I think you mean "the last characters of each line before the LAST /"?

this function could be applied recusively ;)

http://www.briandunning.com/cf/674

  • Author

If the number is not constant, a recursive calculation is required - so either a custom function, or a repeating calculation field, or a script.

I think you mean "the last characters of each line before the LAST /"?

Thanks guys, I actually meant after the last /

The briandunning function is really nice, now I just have to check for the amount of "/"s.

Robin

no, you haven't ;)

use the occurrence -1

Edited by Guest

  • Author

Oh I see, perfect, before I read your post, I already used patterncount, but yours is a lot easier. Thanks

Robin

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.