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.

Featured Replies

Hi

I am constantly coming across situations where I would like to extract the text of varying length between two text strings. I would like to use a insert calculation to get this information to a new field called. " MyINFO"

 

EX

 

Record contains text

 

I used to go to the country to see all the farm animals. Now I stay home.

I used to go to the city to view all the tourist sites. Now I stay home.

I used to go to the beach to swim in the ocean. Now I stay home.

I used to go to the bars to see people. Now I stay home. 

 

So in the above cases I am needing to extract the text between  "I used to go"   and " Now I stay Home."

 

Is there a simple way to do this in an Insert calculation script step?

thank you

 

Have you looked at the Custom Functions at Brian Dunning's site? There are a least 2 that are called Between

  • Author

I  don't know how to do that. I went to my custom functions window and pasted in the function but it has errors.etc. I just want to learn how to do this somehow.  I don't understand what to do with custom functions but my bigger concern is learning how to do this for my understanding.

If you want to learn the basic of how to do something like this I would start playing around with the Position (), Left (), Right (), Middle (), length (), and perhaps even Trim () functions.

 

You can use combinations of them to parse characters out of strings. 

  • Author

I see but the example I am using is not extracting characters from the strings it is to get the text between two strings

I f I could see how it is done with my example I could understand it I think.

 

 

 

I used to go to the country to see all the farm animals. Now I stay home.

I used to go to the city to view all the tourist sites. Now I stay home.

I used to go to the beach to swim in the ocean. Now I stay home.

I used to go to the bars to see people. Now I stay home. 

 

I want to get the text between "I used to go" and  "Now I stay home."

So it seems to become some kind of middle function

Set Field [ YourTable::MyINFO ; Trim ( Substitute ( YourTable::YourTextField ; [ "I used to go" ; "" ] ; [ "Now I stay home." ; "" ] ) ) ]

I must have missed the request for a script. :sad:

 

Here is a demo of Daniele's calculation he supplied in the past

 

Note: I have updated the file to show the script too.

BetweenforMountain_1.fp7.zip

If you want to learn the basic of how to do something like this I would start playing around with the Position (), Left (), Right (), Middle (), length (), and perhaps even Trim () functions.

 

You can use combinations of them to parse characters out of strings.

There some videos that Skeleton Key has posted to YouTube that are pretty good in explaining how to uses these functions individually and in combinations. START HERE

  • Author

thanks to all of you. That is so cool. Examples are such a good place to start from.

Have a great day....

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.