Newbies orgreeno Posted September 27, 2007 Newbies Posted September 27, 2007 Hello, I'm new to filemaker so this may be an easy question. I can't figure out how to shorten a text field to two sentences. I'm assuming that some how I can split on the second period. Thanks in advance.
Genx Posted September 27, 2007 Posted September 27, 2007 Hi Orgreeno and welcome to the Forums!! You can really do this a few ways... the first two I thought of are below: 1) This one came to mind first for some reason though its a bit roundabout, I seem to like substitute and arrays for some odd reason... Substitute( MiddleValues( Substitute( "I am a sentance. Me To. And me." ; "." ; ".¶" ) ; 1 ; 2 ) ; ¶ ; "" ) 2) This one will probably please more people and is slightly more efficient. Let( sentance = "I am a sentance. Me To. And me."; Case( PatternCount( sentance ; "." ) > 1 ; Left( sentance ; Position( sentance ; "." ; 1 ; 2 ) ) ; Sentance ) ) Hope that helps.
Recommended Posts
This topic is 6269 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 accountSign in
Already have an account? Sign in here.
Sign In Now