The Insert from URL step is very versatile, and if you want to see some cool ways of using it, don’t miss Jason Young’s DevCon session next Tuesday at 10:45 am, right after the opening keynote.

Here’s a video preview of one of the applications Jason will be showing, where the contents of a .vcf file (vCard) are imported as new FileMaker records, including images. The video also features a demo of Dan Wheelon’s recent custom implementation of this technique in a customer’s SeedCode Complete files.

Enjoy!

And if you missed the last preview of Jason’s work, checkout this sexy FileMaker to Dropbox integration he’ll also be diving into.

Update: Jason’s unlocked example file is now available here  =)

Tagged with →  

27 Responses to Importing vCards using Insert from URL

  1. Ben Graham says:

    Wow! this is really nice! Wondering if an example file will be shared after DevCon?

    • seedcode says:

      Definitely. Jason is pretty much in the tunnel getting ready for the conference but after Vegas we’ll be talking more about that file here.

  2. Really excited to see this Vcard method. Contact management is brutal.

  3. Carlo says:

    Amazing stuff ! Any idea of when/if there will be a demo file to play with ?

  4. Carlo says:

    Any progress on the demo ? I’m sure it would interest a lot of people :-)

  5. Carlo says:

    Are we ever going to see a demo file on this technique ?

  6. Prometheus says:

    How is the Demo coming? Really excited to check it out.

  7. seedcode says:

    The example file for this demo is finally available here http://www.seedcode.com/downloads/ as “vCardDrop”. Enjoy!

  8. Guillaume says:

    Hello
    Congrats for this script,It is very interesting and well thought especially for the part “extract variables”. I would like to insert this script in a solution with 3 different tables (CONTACT, TELECOM, ADRESSES). I tried to add a step to create anew records on the linked table CONTACT_TELECOM juste after the “Make Phone Record(s): first of each “class” in the contact’s record” but I have not succeeded, Do you have a script that works with this modele ?
    Thanks for your precious help

  9. Andrew says:

    Hi there, this is great however unfortunately there is a slight problem with the scripting for companies. If you add a Vcard that is a company (no first or last name) the name of the company is not inserted into your company field in filemaker. Instead the company name is divided up and inserted into your first and last name fields. Hopefully that makes sense. It would be great to here how this is resolved. Thanks

  10. Gordon says:

    Love this script, fantastic implementation. However seem to be broken by the update to FM15 and FM16. Any thoughts?

    • seedcode says:

      Something has changed in the way we’re looking for the end of the base64 encoded image. So the script works great for vcards without images. I’ll take a look at the image part when I get a chance. Thanks!

      • Gordon says:

        Understood and appreciated, the other issue to report is, IF the destination container field is stored remotely via FMS, the script will fail since the IMPORT variable will not be valid.

    • seedcode says:

      Hi Gordon, So it looks like this is related to line-endings and the following changes to the script “Import vCards [ Text ]” get this working in FM16….

      1. change the If() calc in line 116 to this: $sc_thisChar = Char(13) or $sc_thisChar = Char(10) or $sc_thisChar = Char(1000013)

      2. change the value set at line 122 to this: Middle ( Contact::VCardGlobal ; $sc_position1 -1 ; $sc_nextLine – $sc_position1 +1 )

      That gets it working with the base64 image included in our example file. If you get cards with different line endings, at least you’ll know where to make your changes. Hope that helps.

  11. paolo says:

    Hi and many thanks for your code.
    Before changing lines you indicated, loop was infinite.
    After changing lines it is still partially not working for me, because text data are imported but image not and the ending part of base64 image is stored as text in the notes field

    • seedcode says:

      I assume this is with our sample vCard? Sounds like the loop is terminating (change #1) but the base64 may not be getting trimmed correctly (change #2). I’d run the script debugger into line 122 and see if the base64 being returned matches that in the vCard: you may need to change the Middle() function.

      • paolo says:

        Hi, yes I’m using your George Washington.vcf.
        Debugging into line 122, $sc_b64 results as only “/” character.
        Using original ContactsVcard.fmp12 and applying only change 1, $sc_b64 matches the one in vcf, with the exception of first “/” character and lasts “//Z” characters.
        Image is still not loaded, but all other fields are stored correctly.
        Hope this is understandle

    • seedcode says:

      > Using original ContactsVcard.fmp12 and applying only change 1, $sc_b64 matches the one in vcf, with the exception of first “/” character and lasts “//Z” characters.

      Perfect. That’s what I was trying to get at in change #2. Try playing with the middle math to get those characters included.

      • paolo says:

        Works perfectly.
        Your change #2 was correct, but if I copy and paste it from here to script step, it does not work. I’m using italian FM version. There is something does not match in language conversion. I have tried making slight changes to different part of the step content, to understand the reason (eg. field names are stored as ID, strange chars could have been inserted pasting text …) but nothing. The only chance was to rewrite the step manually and it was OK after that ! Note that change #1 have had no problem…
        Anyway … it does not impact the value of your code, so thanks again !

    • seedcode says:

      I’m so glad that worked Paolo! Thanks for letting us know–and thanks for your kind words about our work.

  12. Liam Rumpel says:

    This is a great solution, but drag-and-drop only worked once for me. Am I missing something here? I tried downloading a fresh copy of your unlocked VCF db. I tried using a different user account, turning off my firewall, and rebooting. I get no response from FileMaker Pro Advanced 16 when drag-and-dropping either the Washington.vcf or my own test vCard files. I am using Sierra 10.13.2, and again, your db worked flawlessly the first time. Any suggestions?

    • seedcode says:

      Hi Liam, All I can suggest is that you may need to make a new record first; the script doesn’t make a new record in the contact table. But if I make a new, blank record then I can drag the Washington.vcf to it and it works just like the first time. (Tested in 10.13.3)

      Hope that helps.

      • Liam Rumpel says:

        It failed again after I created a new record first. On a possibly related note, my computer was unresponsive to mouse clicks a few times even before I tried your example. I am running a virus scan now. If the issue doesn’t resolve after that then I’ll try this on another computer (if I can figure out how to install a second copy of Filemaker with a single license). I’ll keep you posted.

        • Liam Rumpel says:

          Ok, got it working! Evidently all I needed to do was drag the vCard file/icon on top of the profile photo placeholder in your database.

          Just doing things the hard way, one day at a time…

Leave a Reply

Your email address will not be published. Required fields are marked *

Share →
Shop TemplatesYear End Sale: up to 25% off
DOWNLOAD
DayBack Calendar
DayBack's 30-day trial is unlocked so you can customize it and integrate it with your files.
Download DayBack and we'll send you a couple short emails with tips on how to modify it and use some of the coolest features.
Thank you! Please download: DayBack Calendar
Need More?
SeedCode tips & example files in your inbox
Need More?
SeedCode tips & example files in your inbox
Want More?
Be the first to see articles and tips like these
DOWNLOAD
TimeZync
Download TimeZync and we'll send you a couple short emails with tips syncing your FileMaker Go files.
Thank you! Please download: TimeZync
Want More?
Be the first to see articles and tips like these