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.

Create duplicate records if carriage return exists

Featured Replies

  • Newbies

I can't wrap my head around how to deal with this. I have a field (Field 1) with hard returns. I would like to use these returns as the basis for creating individual records. I need to script this due to the number of records involved. Here's an example of my starting data:

Record Number Field 1 Field 2

1 abc Joe

def

2 ghi Fred

jkl

mno

This is the desired result:

Record Number Field Field 2

1 abc Joe

2 def Joe

3 ghi Fred

4 jkl Fred

5 mno Fred

It's hard to tell for sure from such an abstract example, but I believe you should end up with something like:

ChildID....Value....ParentID

1..........abc......1

2..........def......1

3..........ghi......2

4..........jkl......2

5..........mno......2

in a related table.

  • Author
  • Newbies

Sorry. My example got screwed up. Let me simplify the question:

If I have a field with a carriage return in the data, how can I create two records out of that single record with data above the carriage return in record 1 and data below the carriage retien in record 2?

IMHO, your example was clear enough. The part I am questioning is that you apparently want to create the separate records in the same table as the original one. You didn't say what this is about, but normally you'd want to leave the existing record as is in the parent table, create the two (or more) individual records in a child table, and link them back to their parent record.

  • Author
  • Newbies

I could create the records in a child table, but I don't really need to preserve the source data. In either case what I'm struggling with is how to parse the data based on teh carriage returns. Working on some math calculations using Position and Length fuctions...

what I'm struggling with is how to parse the data based on teh carriage returns.

That's the easy part - just loop over the return-separated list, using =

GetValue ( $yourList ; $i )




each time increasing $i by 1, until =




$i > ValueCount ( $yourList )

I don't really need to preserve the source data

Well, the idea is to store "Fred" in one place only instead of three.

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.