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.

Parsing text from one field and placing in another - scripting for a button

Featured Replies

Good morning gang!  It's been a LONG time since I've made mods to my database.  But now, due to a change in the way the data comes in from the source, we have an issue that's making things very slow in the data entry group.

Essentially, we have 2 lines of data in a field, but only need the first line of data (address number, street - ie "123 Anywhere St"), and we need that data copied to two other fields, the address number field and the street field.

Here's the field we need to copy the num and street from:

  Part1.JPG.af9ff56d53bf95b8528d19ab3d9e0457.JPG

And here's the fields we need the NUM and STREET copied to:

1110734060_Part2.JPG.42f4223c8426a69446606826a01ee353.JPG

Now, like I said, it's been a VERY long time since I wrote this database, and I'm old now and my memory is shot.  lol 
I cannot for the life of me, remember the best and most efficient way to get this done. 

We have a button we could integrate the copying of the parsed data into.  I guess I just need help with the scripting for this button.

If anyone could help with this, I'd be grateful!  Thank you in advance. :)

 

The problem with a single example is that it not always represents all possible cases. It is very easy to extract the first line of text from a field using the GetValue() function. However, then comes the question where does the house number end and street name begins. If all addresses follow the same rule of house number being the first - and only the first - word in the extracted line, you could make your script do:

Set Variable [ $streetAddress ; GetValue ( YourTable::SourceField ; 1 ) ]
Set Field [ YourTable::HouseNumber ; LeftWords ( $streetAddress ; 1 ) ]
Set Field [ YourTable::StreetName ; RightWords ( $streetAddress ; WordCount ( $streetAddress ) - 1 ) ]

If you are importing the data. you could make this a part of your importing script.

Edited by comment

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.