Jump 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.
Juggernaut

Wildcard search within calculation

Featured Replies

I have a text field which contains a code that is in the format of M followed by 5 numbers, which varies in position in the field and the actual numbers vary as well eg. M80410, M60234 etc.

I want to make a calculation that extracts just that code from the rest of the text in that field.

I tried using:

Middle(text field;Position(text field;"M#####";1;1);6)

Trying PatternCount (text field;"M#####") failed as well.

I then realised that the the wildcard # for numbers (and wildcards in general) didn't work in calculations. I can't figure out how to tell the middle function to look for an M followed by 5 numbers in the text field.

Thanks for any advice.

Maybe you could do something like this.


Let ( [ f= field;

        x= Substitute ( field ; [0;"^"]; [1;"^"]; [2;"^"]; [3;"^"]; [4;"^"]; [5;"^"];  [6;"^"]; [7;"^"]; [8;"^"];  [9;"^"] );

        p= Position ( x; "M^^^^^"; 1; 1 )  

      ]; 

        Case ( p;  Middle ( f; p; 6 ) )

     )

Edited by Guest
Added Empty check

  • Author

Brillant ! So make a variable with every number in the field I need to parse from a "^" so then I can have a search string that works !

Thanks very much, works a treat.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

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.