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.

I could really use some help with imports

Featured Replies

  • Newbies

At one time I was a decent FM guy, but that was a long time ago and my technical skills are novice level today.

Here is my frustration: I am trying to bulk import text files; each file contains hundreds of what I would like to be records; each text file line is delimited by a tab or cr; each string of text I am trying to save as a records ALWAYS starts with "Starting Hand #" and ends with WINS ###

I simply cannot get started with this in FM. Yes I can go to Excel, massage the text and work it that way, but it is very time consuming. My hope is to use a parsing routine to grab each "record", store it (container?) and use that as a staging tool to perform other actions.

I would really appreciate some help. Any advice? FM 6. Thanks so much!

Below is sample text, the files simply contain hundreds of the same:

[color:red]Starting hand #170,508,529

Level I: 25/50 Blinds

Matchstk starts with 10,000

papachulo starts with 10,000

MacArthur starts with 10,000

fcbayern starts with 10,000

diamonddave starts with 10,000

4555MC starts with 10,000

WireySpinde11 starts with 10,000

Ommwizard starts with 10,000

SAShawn starts with 10,000

bojobo starts with 10,000

Matchstk has the dealer button

>>>DEALING HOLE CARDS<<<

papachulo posts the small blind 25

MacArthur posts the big blind 50

bojobo: lol

fcbayern folds

bojobo: and only 183 in here lol

diamonddave folds

bojobo: hey MCCCCCCC

bojobo: congrats on big win

bojobo: i just saw yesterdays reslts in lobby

4555MC times out

4555MC folds

WireySpinde11 folds

bojobo: not here?

bojobo: LATE AGAIN

bojobo: :

Ommwizard times out

Ommwizard folds

SAShawn times out

SAShawn folds

bojobo calls 50

Matchstk folds

papachulo calls 25

MacArthur times out

MacArthur checks

>>>DEALING FLOP<<< [ 7s Qs 6h ]

papachulo checks

MacArthur checks

bojobo bets 150

papachulo folds

MacArthur folds

bojobo takes back 150

bojobo does not show hand

[color:red]bojobo wins 150

This may be a stretch, but for lack of any other starting point you might take a look at what Johnathan Stark did to import iCals.

http://fmforums.com/forum/showtopic.php?tid/176517/post/204623/hl//

It isn't clear to me what you want as the end result.

Do you want all of this data in one field or in separate fields?

Depending upon what you want as your end result, you will find that most of the time, it is easier to use a Text Editor to set up your file first, before trying to import. On the Mac I use TextWrangler because I can use Grep Patterns in the Find and Replace, and with Regular Expressions. The equivalent on Windows is EditPad I think.

HTH

Lee

  • Author
  • Newbies

I was hoping to import such that all data(s) between the delimiters was captured as one record. After proper capture of a record, my thought was to chop it up into various fields. Does that make sense?

  • 3 weeks later...

Try this. Set up a table with three fields, a text field and a number field and a global number.

0. set the global field = 1

1. import your file into the text field.

2. after the import got to the first record

3. using a loop set the number field equal to the global field which equals 1.

4. using a case statement test if the word "wins" is in the text field. if it is add one to the global field. ie global field = global field +1

5. exit the loop after the last record.

what this does is assigns the same number to all the records that you want to keep together. Now set up another table with a text field and a number field and create a join between the number fields. loop thru the first table setting the second table text field with:

set ( second table::text field = second table::text field & first table:: text field )

this will concatenate all the records in the first table with the same number field. now you can get rid off the returns and parse out the data.

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.