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.

Importing several lines of text into one field?

Featured Replies

  • Newbies

Hi!

I want to import several lines of text (an abstract of an article) into one field. After the text comes a delimiter of my choice, currently "

First thing: text fields have a 64,000 character limit, so you won't fit 1MB of text into a single field be it global or not.

One method is to write a simple looping script. First find all the records you want to concatenate and sort them into their appropriate order. (I'll assume that the text is in a field called "Lines" and it goes into a field called "gFull".) Then run this script:

Set Field [gFull, ""]

Go to Record/Request [first]

Loop

Set Field [gFull, gFull & Lines]

Go to Record/Request [exit after last, next]

End Loop

To get your delimiters out use the Substitute() function:

Set Field [gFull, Substitute(gFull, "

  • Author
  • Newbies

Hi!

Thanks for replying and the script. I'll check it out.

I think I'll try to make more clear what I want to do.

In the DB each records has one particular field that contains this multiline content - abstracts from a article. There's only one abstract per record. One of these abstracts is someting in size of 1000 to 2000 characters long. So the content in this field (in one of the records) are also 1000 to 2000 characters.

My source file is a plain text file with alot of abtracts, one after the other separated by


# Import all the text one line per record into the field "RawText"

import[import order: RawText(text)]

show all records

unsort

go to record/request [first]

set field [gTextbuffer,""]

# Loop through the raw text and gather it into global gTextbuffer

loop

if [patterncount(RawText,"*****")]

# Separator found so save the text in a new "formatted" record

# but first save the number of the current raw text record

Set field [gRecordNo, Status(CurrentRecordNumber)]

New Record/Request

Set field [FormattedText, gTextbuffer]

Set field [gTextbuffer, ""]

Set field [RecordType, "Formatted"]

# Now go back to the current raw text record

Go to record [gRecordNo][by field value]

Else

# Not a separator, so add text to buffer

Set field [gTextbuffer, gTextbuffer & "

  • Author
  • Newbies

Great! Thanks!

/per mattsson

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.