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.

Revisited Issue: Parsing Text

Featured Replies

Hey everyone,

I know this is a rather old topic on here and there are a few posts regarding a solution, but for the life of me, I can't get it to work. I was wondering if I could get a second (or third) opinion as to what I am doing wrong here,

1) Have a text field

2) I AM NOT able to parse the needed text from the text field using the formula provided by comment:

Let ( [

start = Position ( text ; prefix ; 1 ; 1 ) + Length ( prefix ) ;

end = Position ( text ; suffix ; start ; 1 )

] ;

Middle ( text ; start ; end - start )

)

This is my text string:

Transaction ID: 2DB113476E10274V984321

An email blah blah blah

So, this is my formula:

Set Field: "mytable:TranactionID" with the result of this:

Let ( [

start = Position ( mytextfield ; "Transaction ID: " ; 1 ; 1 ) + Length ( prefix ) ;

end = Position ( mytextfield ; "

" ; start ; 1 )

] ;

Middle ( mytextfield ; start ; end - start )

)

What am I doing wrong, as I am not getting ANYTHING into my transaction field, it stays blank. HELP!!

I don't see how the calculation dialog let you close it. You've used a variable: prefix

But it was never defined. One way to fix is to define it:

Let ( [

prefix = "Transaction ID: ";

start = Position ( myTextField ; prefix ; 1 ; 1 ) + Length ( prefix ) ;

end = Position ( myTextField ; "

" ; start ; 1 )

] ;

Middle ( myTextField ; start ; end - start )

)

  • Author

This is what I did:

Let ( [

start = Position ( trans::contents ; "Transaction ID:" ; 1 ; 1 ) + Length ( "Transaction ID:") ;

end = Position ( trans::contents ; "

" ; start ; 1 )

] ;

Middle ( trans::contents ; start ; end - start )

)

After hours of it not doing anything, the moment I posted this, it began to work, however it won't work if I use it as a result of a "Set Field" script.

Can you post a simple file showing the problem?

  • Author

I would post the simple file, but as I was "recreating" the issue, the "Set Field" script worked. Now I'm just going to go back through my actual solution, and see what I did different. Thanks to you and Fenton for your help, I appreciate it. UPDATE: Yep, stupid oversight on my part by not making the inteneded result field "global". Everything works fine now, and I have included the simple file for anyone else interested in seeing how to parse info using comments formula.

simple.zip

Edited by Guest
Updated

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.