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.

Parsing csv file

Featured Replies

  • Newbies

I am trying to import a csv file and parse it into an fmp table on fmp go 19.  The import and parsing are working well on a pc.  On my ipad, I am able to import the csv file, but the parsing is creating a blank record for every record parsed.  I suspect it is due to the effort to replace the ipad line feed character with a character return.  My code is

# Replace windows CRLF
If [ PatternCount ( Import CSV::Text ; Char ( 13 ) & Char ( 10 ) ) ]
Set Field [ Import CSV::Text; Substitute ( Import CSV::Text ; Char ( 13 ) & Char ( 10 ) ; "¶" ) ]
End If
#Replace iOS Unix (LF)
If [ PatternCount ( GetAsText ( Import CSV::Text ) ; Char ( 10 ) )]
Set Field [ Import CSV::Text; Substitute ( Import CSV::Text ; Char ( 10 ) ; "¶" ) ]
End If

Also, what is the ipad based file path format, how many slashes following file:, I have seen several different formats based on which version of FM go.

 

Thanks

 

Ron

We don't see the actual file, and we don't see how exactly you parse it - so this is pure guesswork. I would guess that if you're getting blank records, then you have blank lines in the source. You can test for this by looking at ValueCount ( Import CSV::Text ) and PatternCount ( Import CSV::Text ; "¶¶" ).

BTW, there is no need to test for the presence of a pattern before substituting it. If the pattern doesn't occur, Substitute() will not do anything. And I would use a variable as the target instead of the original field.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

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.