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 6237 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

Purpose: Grab all of the field starting at the first number. Examples are:

CSR2400882A (result should be 2400882A)

3266427 (result should be 3266427)

CHSZzSTVa241CRMC (result should be 241CRMC)

Here's what I currently have (result is text)B)

Let ( [

num = Substitute ( text ; [ 0 ; "~" ] ; [ 1 ; "~" ] ; [ 2 ; "~" ] ;[ 3 ; "~" ] ; [ 4 ; "~" ] ; [ 5 ; "~" ] ; [ 6 ; "~" ] ; [ 7 ; "~" ] ; [ 8 ; "~" ] ; [ 9 ; "~" ] ) ;

pos = Position ( num ; "~" ; 1 ; 1 )

] ;

Right ( text ; Length ( text ) - pos + 1 )

)

... I know, I know ... but I couldn't figure out how to best approach it (obviously). I could also use Middle ( text ; pos ; Length ( text )) but can I eliminate the substitution portion to identify each number? That part is so long and ugly! Sometimes my brain can't find elegance if it slapped me on the forehead!

UPDATE: I originally had the string in rows down the page but I thought it wouldn't look so twisted if it was all together. It still looks twisted. :crazy2:

LaRetta

Edited by Guest
Added update
Posted (edited)

Let ( [

num = Substitute ( text ; [ 0 ; 1 ] ; [ 1 ; 1 ] ; [ 2 ; 1 ] ;[ 3 ; 1 ] ; [ 4 ; 1 ] ; [ 5 ; 1 ] ; [ 6 ; 1 ] ; [ 7 ; 1 ] ; [ 8 ; 1 ] ; [ 9 ; 1 ] ) ;

pos = Position ( num ; 1 ; 1 ; 1 )

] ;

Right ( text ; Length ( text ) - pos + 1 )

)

Okay, changing the tilde to a 1 makes it smaller but it STILL looks twisted. Please save me from myself ... I KNOW I should be able to combine those numbers and find the starting position of them in one whack (and without a CF), right?

Edited by Guest
Changed sentence
Posted

Hello,

Perhaps with "Filter" ? B)

let ([

Num = Filter ( Text ; "0123456789" ) ;

Pos = Position ( Text ; Left ( Num ; 1 ) ; 1 ; 1 )

];

Middle ( Text ; Pos ; Length ( Text ) )

)

Agnes

Posted

Of Course!! Thank you! It felt like the easy answer was on the tip of my tongue and I just couldn't find it! DOH! Thanks for putting me out of my misery, Agnes! :waytogo:

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