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.

Obtain words to left of signifier

Featured Replies

Hi, Is there a way to obtain any number of words e.g. 3, 4, 5 or 6 say which are to the left of an opening bracket ( or alternatively to the left of a 1,2,3 or 4-digit number/ Thx.

For example:

Green large t-shirt (some text here)

to obtain: Green large t-shirt

or

Green large t-shirt 234

to obtain: Green large t-shirt

Since there might be any number of words before the bracket is there a way to look for the start of the bracket and just keep the words to the left of it?

Edited by Guest

Try =

Trim ( Left ( text ; Position ( text ; "(" ; 1 ; 1 ) - 1 ) )

or alternatively to the left of a four-digit number

Not quite the same thing.

Try:

Left ( YourTextField ; Position ( YourTextField ; " (" ; 1 ; 1 ) - 1 )

Note: I put a space before the ( because your example had one.

HTH

Lee

Man you are quick today. ???

or alternatively to the left of a four-digit number

If your field is named "myDataField" then...

Let(

[

fourDigitNum = Left(Filter(myDataField;“0123456789”); 4)

];

Case(

Length(fourDigitNum) = 4;

Trim ( Left ( myDataField ; Position ( myDataField ; fourDigitNum ; 1 ; 1 ) - 1 ) );

""

)

)

Edit:

To generalize this to 1, 2, 3, or 4-digit numbers...

Let(

[

fourDigitNum = Left(Filter(myDataField;“0123456789”); 4)

];

Case(

(Length(fourDigitNum) > 0) and

(Length(fourDigitNum) ≤ 4);

Trim ( Left ( myDataField ; Position ( myDataField ; fourDigitNum ; 1 ; 1 ) - 1 ) );

""

)

)

Edited by Guest

or alternatively to the left of a 1,2,3 or 4-digit number

But not a 5-digit number?

  • Author

Yes, I can't think of the problems fast enough. Thank you it's problem solving in real time!

  • Author

Right. I have a field which might look like this:

Green trousers (large)

Ignore the fact that the word in brackets is 3rd word from left but it is always last.

I want to be able to cut the word 'large' out of this and post it into another field.

Thx

Try =

RightWords ( text ; 1 )

If it is always only one word:

RightWords ( text ; 1 )

  • Author

It might 1,2 3 or even 4 words

See:

http://fmforums.com/forum/showpost.php?post/289685/

  • Author

This looks complicated. Suppose I had this:

green trousers (large size 2)

or black outdoor jacket (large size 2)

How would I trim away everything to the left of the bracket "(". Then I could just substitute the () with blanks and post what remains??

  • Author

These solutions worked well but the first was sufficient:

Trim ( Left ( text ; Position ( text ; "(" ; 1 ; 1 ) - 1 ) ).

Is there a way I could use this so that I would be left with what I originally discarded?

For example:

Green large t-shirt (some text here)

to obtain: (some text here)

Thx.

Using comment's calculation, but modified to fit your need.


Let ( [

start = Position ( YourTextField ; "(" ; 1 ; 1 ) + Length ( "(" ) ;

end = Position ( YourTextField ; ")" ; start ; 1 )

] ;

Middle ( YourTextField ; start ; end - start )

)

Edited by Guest

To include the brackets, then modify it like this.


Let ( [

start = Position ( YourTextField ; "(" ; 1 ; 1 ) + Length ( "(" ) ;

end = Position ( YourTextField ; ")" ; start ; 1 )

] ;

"("  & Middle ( YourTextField ; start ; end - start )  & ")"

)

  • 2 weeks later...
  • Author

Tried but not succeeded at also trimming everything away to the right of the '(' - another use, and including the '(' itself.

So;

t-shirt red $40 (small) would yield:

t-shirt red $40

The content of the brackets constantly changing the only universal constant is the existence of the bracket itself. Thx.

No, not thanks.

You either have changed what you are describing as you need, or the calculations should work.

Left ( YourTextField ; Position ( YourTextField ; " (" ; 1 ; 1 ) - 1 )




will give you [color:blue]t-shirt red $40



and


Let ( [

start = Position ( YourTextField ; "(" ; 1 ; 1 ) + Length ( "(" ) ;

end = Position ( YourTextField ; ")" ; start ; 1 )

] ;

"("  & Middle ( YourTextField ; start ; end - start )  & ")"

)

will give you [color:blue](small)

Lee

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.