Jump to content

Recommended Posts

Hey,

I have a Tab-Separated Text File which I want to import to a database that I just created in FileMaker Pro 15. The text file essentially is a log of events, for instance, one line describes an order, another line describes a payment that has been made. The problem is that I somehow need to import all these lines into different tables. I want all lines in the log file that describe a payment in a table called Payments, and all lines that describe an order in a table called Orders for example.

I'm just starting out with FileMaker so forgive me if there is an obvious solution that I'm not aware of. I have a background in software development, so the only solution that I can think of is writing a small program myself that does all the parsing for me and creates separate text files that contain all the orders and payments and other events that have been logged in the file. Then I could simply import each file into the table I need all the data in. 

So to sum everything up, my main question is if there is a way to somehow parse the text file before importing it. I know that you can create custom scripts in FileMaker but I'm not sure if what I need to do can be done just with that.

Thanks in advance,

Mike

Share this post


Link to post
Share on other sites
3 hours ago, 123 said:

one line describes an order, another line describes a payment

You left out the part explaining how to tell these two apart.

Share this post


Link to post
Share on other sites

Hey,

each line has a certain keyword. For example Payment or Order. Those keywords are in the same position in every line.

Thanks for your response,

Mike

Share this post


Link to post
Share on other sites

Basically, you have two options:

1. Import the file twice, once into the Payments table and once into Orders. In each table, define a Type field and set it to validate by calculation:

 Self = "Payment" 

and:

Self = "Order"

respectively, validate always. When importing, map the keyword to the Type field.

 

2. Import into a temp table first, then do a find for each type and import the found set into the corresponding target table.

 

Both options can be scripted so that the user only needs to select the file.

Edited by comment
  • Like 1

Share this post


Link to post
Share on other sites

Hey,

thanks for the quick response. The first way you described sounds like a good solution, I will give it a try tomorrow, thank you so much.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Similar Content

    • By Oyseka
      Hi all, I need to go to different layouts depending on device and parameters and while the script functions fine for the desktop I can not get it to go to the correct layout in the iPhone. What am I doing wrong.
      Sorry all, found my level of stupid and answered it myself.
    • By Prasad Khandagale
      FM Quizillaa in Android version. Coming Soon! 

    • By HOnza
      The new version now includes 24U Toolbox Plug-In version 3.0.3
       
      Prague, CZ — January 31, 2019 — 24U Software has updated 24U FM Bench to version 1.3 which now includes code-signed 24U Toolbox Plug-In 3.0.3 with many new features and improvements.
       
      What's new in version 1.3
      24U Toolbox Plug-In 3.0.3 is now included with 24U FM Bench. This new version of the plug-in brings several new features and improvments, including compatibility with latest operating systems and the FileMaker plarform. The plug-in is now also code-signed. Code-signing is a security feature that allows user to verify the identity of the plug-in publisher and that the plugin has not changed. This makes it easier to deploy FM Bench in environments with strict security rules, where only code-signed software is allowerd to be installed.
       
      About 24U Toolbox Plug-In
      24U Toolbox Plug-In is a stable and reliable client & server-side plug-in providing a set of handy functions for your daily use, such as Execute SQL, running system scripts etc. The new version added support for iOS and FileMaker Cloud, and a great new function for converting FileMaker-native styled text to clean CSS-formatted HTML.
       
      About 24U FM Bench
      No more compromises! Gettting the best performance out of FileMaker Pro by optimizing user solutions and achievement 100+% speed gains in almost no time.
       
      Detective benchmarks user solution. It measures how long everything takes and stores the measured values in a log for further analysis.
       
      Bottleneck finder finds the bottleneck of user solution. It calculates the total time spend within each script over a specific time period and tells you which script consumed the largest part.
       
      Session browser lets you examine individual user sessions. User can see every single action that was measured within each session and how long FileMaker spent executing it.
      This great not for optimization but even better for troubleshooting. Can be seen what users were doing when.
       
      Availability and Pricing of 24U  FM Bench
      Licenses for 24U FM Bench start at US$197 per seat and $1177 per server. Volume discounts are available for 5 or more seats.
       
      More information: https://www.24usoftware.com/fmbench/
      Buy: https://www.24uSoftware.com/fmbench#buy
       
      About 24U Software
      With a team of full-time testers, web, plug-in, Mac, Windows, Linux, iOS, and Android native app developers, and FileMaker certified developers, led by the FileMaker DevCon 2015 Developer Cup champion, 24U excels in taking care of existing FileMaker solutions, optimizing their performance, identifying and resolving potential issues and liabilities, improving reliability, stability and scalability, integrating them with other systems including various hardware devices, and extending them beyond expectation.
      As a platinum member of the FileMaker Business Alliance, we help global businesses around the world to maintain sustainable growth by working with their in-house developers or completely taking care of the maintenance and development of their business solutions.
       
      Customer contact:
      HOnza Koudelka
      Software Division Manager, 24U s.r.o.
      sales@24usoftware.com
      http://www.24usoftware.com
       
      Press Contact:
      pr@24uSoftware.com
       
      ###
       
      (c)2019 24U s.r.o. All rights reserved. 24U, 24U Software, and FM Bench are trademarks of 24U s.r.o. FileMaker is a trademark of FileMaker, Inc., registered in the U.S. and other countries. All other trademarks are the property of their respective owners. Pricing and availability are subject to change without notice.
    • By HOnza
      All 24U plug-ins are now code-signed for better security
       
      Prague, CZ — January 31, 2019 — 24U Software has released a new updates of all currently available 24U’s plug-ins for the FileMaker platform. The just released new versions of the following plug-ins are now code-signed for macOS, Windows, and iOS:
       
      - Gonector
      - 24U SimpleDialog Plug-In
      - 24U SimpleFile Plug-In
      - 24U Phone Companion Plug-In
      - 24U Phidgets Plug-In
      - 24U Simple Talk Plug-In
      - 24U Toolbox Plug-In
      - 24U SimpleSound Plug-In
      - 24U SimpleHASP Plug-In
       
      About code-signing
      Code-signing is a security feature that allows user to verify the identity of the plug-in’s publisher and that the plug-in has not been modified by maliciuous software such as virus. This is not only safer for everyone but also makes it easier to deploy solutions using 24U’s plug-ins in environments with strict security rules, where only code-signed software is allowerd to be installed. Code-signing is becoming one of security measuers required, by default, by the latest version of the macOS and Windows operating systems, so this update is recommended to all users in order to maintain better compatibility with future versions of the operating system and the FileMaker platform.
       
      About Gonector
      Gonector is a FileMaker plug-in that allows a native application for iPhone or iPad to communicate directly with mobile hardware devices. Being able to interact with professional mobile devices enables you to use the FileMaker platform to create a POS, Inventory and lots of other heavy-duty mobile business apps with friendly, fast, and reliable user interface.
       
      About 24U SimpleDialog Plug-In
      Display professionally looking custom input dialogs and progress dialogs. New version added Pause and Cancel buttons to progress dialogs and input dialogs for iOS.
       
      About 24U SimpleFile
      24U SimpleFile Plug-In lets user FileMaker solutions easily access files stored anywhere on your hard drive, server, or network, allowing your users to keep their files and documents organized without ever leaving your solution’s user interface.
       
      About 24U Phone Companion Plug-In
      Robust telephony integration for FileMaker Pro. New version adds support for VOIP systems by directly controlling SNOM telephones. Make calls by clicking a button you avoid calling wrong numbers
       
      About 24U Phidgets Plug-In
      Control hardware devices and read environmental sensors, read & write low-frequency RFID tags. New version added support for VINT, stepper motor and more.
       
      About 24U Simple Talk Plug-In
      Custom internet client and server inside FileMaker Pro. Recently released new version added 64-bit support.
       
      About 24U Toolbox Plug-In
      Stable and reliable client & server-side plug-in providing a set of handy functions for your daily use, such as Execute SQL, running system scripts etc. New version adds support for iOS and FileMaker Cloud, and GetAsHTML.
       
      About 24U SimpleSound Plug-In
      Audio playback and MP3 ID3 metadata management. Latest version no longer depends on QuickTime and ID3 tags manipulation now works server-side.
       
      About 24U SimpleHASP Plug-In
      Secure hardware-aided protection of your data and intellectual property, using copy-protected USB dongles. New version is compatible with latest version of FileMaker and latest version of the Sentinel dongles.
       
      Availability of  24U Plug-ins
      All the updated 24U Plug-Ins are immediately available for download free of charge as fully functional 14-days trial versions, which can be activated after purchasing a license.
       
      More information: https://www.24usoftware.com
       
      About 24U Software
      With a team of full-time testers, web, plug-in, Mac, Windows, Linux, iOS, and Android native app developers, and FileMaker certified developers, led by the FileMaker DevCon 2015 Developer Cup champion, 24U excels in taking care of existing FileMaker solutions, optimizing their performance, identifying and resolving potential issues and liabilities, improving reliability, stability and scalability, integrating them with other systems including various hardware devices, and extending them beyond expectation.
      As a platinum member of the FileMaker Business Alliance, we help global businesses around the world to maintain sustainable growth by working with their in-house developers or completely taking care of the maintenance and development of their business solutions.
       
      Customer contact:
      HOnza Koudelka
      Software Division Manager, 24U s.r.o.
      sales@24usoftware.com
      http://www.24usoftware.com
       
      Press Contact:
      pr@24uSoftware.com
       
      ###
       
      (c)2019 24U s.r.o. All rights reserved. 24U, 24U Software, and FM Bench are trademarks of 24U s.r.o. FileMaker is a trademark of FileMaker, Inc., registered in the U.S. and other countries. All other trademarks are the property of their respective owners. Pricing and availability are subject to change without notice.
    • By JH Howland
      Filemaker Pro 11 is running on two Windows 10 computers connected as Host and Client over a network.
      The script to import data from an Excel .csv file utilizes the following script step options:
          1. Un-Checked - Specify data source - File
          2. Check - Specify import order, Import Action
              a. Select - Update existing records in found set
              b. Check - Don't import first record (contains field names)
          3. Check - Perform without dialog
      When the Import script is run from the Host computer, and the desired .csv file is manually selected, the Excel first row field names are not imported and the second row with the data is imported as expected. (See Host Import Mapping)
      When the same script is run from the Client computer, the Excel first row field names are imported and not the second row data.  To get the proper result, I have to leave the check box for "Perform without dialog" unchecked and then manually, from the "Import Action" group, check the box for "Don't import first record (contains field names)" to get the proper data imported. (See Client Import Mapping, check box is no longer checked)
      Is this caused by a defect in FMP 11?  I can't figure out why this is happening.


  • Who Viewed the Topic

    5 members have viewed this topic:
    Ed@  Bertrand  Noakess  dennis_em  DR. ALI BAHAR 
×
×
  • Create New...

Important Information

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