Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

Hi!

 

I have a field containing a file name for example:

 

af10-2689_001

 

I am trying to remove the prepending "af" and everything after the underscore just leaving the

xx-xxxx in the middle.

 

This is what I have so far, but it is not working. I am getting an error message that "List usage is not allowed in this calculation."  Not sure what I doing incorrectly.

 

GetValue (Substitute (file name ; ["af" ; ""] ;  ["_" ; ""]  ; ¶ ) ; 1 )

 

Any suggestion would be most appreciated.

 

Thanks!

Posted
The rest of the values are numeric.

 

Ah. Then you should also note that a dash, when placed between two digits, is NOT a word separator but an underscore is. Therefore =

LeftWords ( file name ; 1 )

would return "af10-2689" in your original example, and =

Filter ( LeftWords ( file name ; 1 ) ; "0123456789-" )

would also remove ANY non-numerical characters without having to hard-code them, resulting in "10-2689".

Posted

Ah. Then you should also note that a dash, when placed between two digits, is NOT a word separator but an underscore is. Therefore =

LeftWords ( file name ; 1 )

would return "af10-2689" in your original example, and =

Filter ( LeftWords ( file name ; 1 ) ; "0123456789-" )

would also remove ANY non-numerical characters without having to hard-code them, resulting in "10-2689".

 

Perfect!

This topic is 4093 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.