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.

Text calc to choose words left of characters

Featured Replies

I'm trying to figure how to calc this out.

Text Field1 contains:

John Smith :B My top 100 greatest ideas ever

or contains

My favorite sister (who really cares?)

Text Field2 contains: I want it to show only the words left of the characters..... like ( :) , ....or to return the word count for use in another calc. sorry 'bout that!

So if...Text Field1 contains - John Smith :) My top 100 greatest ideas ever

Text Field2 contains - John Smith

Help is always appreciate.

Edited for better explanation....

Edited by Guest

Well, that is awfully vague ... there is no calculation which can fit all situations; depending no matter where to start, what character to use as break point and so on. But this might get the conversation going so we can pin down what you really need:

Let ( [

breakChar = ":" ;

stop = Position ( text ; breakChar ; 1 ; 1 )

] ;

Trim ( Left ( text ; stop - 1 ) )

)

I suppose you can use Middle() and more appropriately control where to start and end and so on ... but it is pretty-much guess work at this point.

Here is a sweet one I found from Comment. It is quite generic and able to flex nicely. It might fit your needs better (but you might have to adjust if only one break character is available:

Trim(

Let(

[

Commas = PatternCount(text; ",");

start = Position ( text; ","; 1; Commas - 1) + 1;

end = Position (text; ","; 1; Commas )

]

; Middle (text; start; end - start)

)

)

:wink2:

  • Author

I'm checking these now.

Field1 = title

Field2 = Only the words left of ? ( :B or ,

This is for web searching capabilities. The site I'm using this on doesn't seem to like them.

2nd Edit :) Some titles also have both or

some may have none of the above.................

Also can Commas=Case (statements that'll check for these characters?)

Edited by Guest

You could use the Substitute() function to 'normalize' all the break characters you want to a single one, e.g.:B

Let ( [

sub = Substitute ( YourField ; [ "(" ; "," ] ; [ ":" ; "," ] ; [ "?" ; "," ] ) ;

pos = Position ( sub ; "," ; 1 ; 1 )

] ;

Case ( pos ; Trim ( Left ( sub ; pos - 1 ) ) ; YourField )

)

  • Author

You guys never cease to amaze me......

Works like a charm!

Thanks to both of you for the help.

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.