Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Importing Help

  1. #1
    intlistsys is offline Member
    Join Date
    Dec 2008
    Posts
    9

    Default Importing Help

    Just got Sugar Community 5.1.0 and am having trouble importing data from a CSV file into a custom module which I put together.

    I used the module builder, with "basic" template, published the module but keep getting an error when trying to import.

    The error is:

    "
    Import Errors Occurred
    Query Failed:INSERT into b2c3d_contact_management set id='20869c76-f6f6-1808-de96-494bcf2db9c1', date_entered='2008-12-19 16:43:45', date_modified='2008-12-19 16:43:45', modified_user_id='9b2ef973-f514-7279-6d1b-49494c22ff29', created_by='9b2ef973-f514-7279-6d1b-49494c22ff29', deleted='0', assigned_user_id='9b2ef973-f514-7279-6d1b-49494c22ff29'::MySQL error 1364: Field 'name' doesn't have a default value
    Importing Records 1 to 507 of 507
    Importing Records 1 to 507 of 507
    "

    I should note that I had a bit more success when I created a custom module using the "person" template, but was not able to import all the files due to a "date" issue, which is why I decided to recreate the module using the basic layout. So, the problem must lie somewhere within the realm of how the templates are recognized/organized?

    I am not using the field "name" anywhere on the module (it was one of the default fields initially), so I have no clue what to do here. I am running out of time and people are getting impatient. Pls help.

  2. #2
    sugarcane is offline Sugar Community Member
    Join Date
    Apr 2005
    Location
    Chicago, IL
    Posts
    1,207

    Default Re: Importing Help

    Hello,

    The Name field on most modules is required and is usually the link to click into that record. Even though you might not be displaying it in the edit and detail views, it is still being seen as required, and this applies to the import. So the message is just letting you know that there was a cell for the Name field that is blank on your csv, or that you are not mapping to this required field. The system will not import any records that do not have the required fields populated
    Intelestream has a great deal of experience hosting and customizing the SugarCRM application. Our company is made up by former employees of SugarCRM, and together we have over 50 years of experience working with the application. To learn more about us, please visit our website at www.intelestream.net or contact us directly at 800-391-4055 or by email at info@intelestream.net

  3. #3
    intlistsys is offline Member
    Join Date
    Dec 2008
    Posts
    9

    Default Re: Importing Help

    Thank you, that makes sense. So, I suppose the next logical question would be "How do I get around this?" I initially wanted to build a module completely from scratch, but there doesn't seem to be an option to do so. Would it make sense, then, to go in an change the field name for the "name" filed to something which I would be using, or will this still conflict? Or, do I create a name field on the CSV file and leave it balnk for all entries? Any advice would be appreciated.

    I wonder if it helps to mention that I initially exported the entire DB from FileMaker into an XLS file, then used OpenOffice to convert the XLS into a CSV.
    Last edited by intlistsys; 2008-12-19 at 06:58 PM.

  4. #4
    sugarcane is offline Sugar Community Member
    Join Date
    Apr 2005
    Location
    Chicago, IL
    Posts
    1,207

    Default Re: Importing Help

    hello,

    i would just change the label name to something that you are using. This field is like the Contact/Account Name fields and like the Subject field for Activities/Cases -- the field when displayed in the system will be clickable and take you to that record. It helps you identify that record. So you definitely want to keep it.

    Then, from your csv, import that field and you should be fine.
    Intelestream has a great deal of experience hosting and customizing the SugarCRM application. Our company is made up by former employees of SugarCRM, and together we have over 50 years of experience working with the application. To learn more about us, please visit our website at www.intelestream.net or contact us directly at 800-391-4055 or by email at info@intelestream.net

  5. #5
    intlistsys is offline Member
    Join Date
    Dec 2008
    Posts
    9

    Default Re: Importing Help

    Unfortunately, that didn't seem to work. I took the "name" filed and renamed it to "First Name" while keeping the LBL_NAME label. I set the First Name field int he csv to inport that data to the LBL_NAME field and got the exact same error as above. What am I doing wrong here?

  6. #6
    sugarcane is offline Sugar Community Member
    Join Date
    Apr 2005
    Location
    Chicago, IL
    Posts
    1,207

    Default Re: Importing Help

    Check your csv - for the First Name field, is there any cell on the csv that does not have this field populated?
    Intelestream has a great deal of experience hosting and customizing the SugarCRM application. Our company is made up by former employees of SugarCRM, and together we have over 50 years of experience working with the application. To learn more about us, please visit our website at www.intelestream.net or contact us directly at 800-391-4055 or by email at info@intelestream.net

  7. #7
    intlistsys is offline Member
    Join Date
    Dec 2008
    Posts
    9

    Default Re: Importing Help

    Yes, there definitely are some unpopulated fields in the "First Name" column, but that's the way it is intended. Some entries simply do not have a first name available. I actually tried to populate the first row, after the header row, of the csv with all the fields to see if that might fix it, didn't work either. Anyway to get around this?

    I wonder if it helps to mention that I initially exported the entire DB from FileMaker into an XLS file, then used OpenOffice to convert the XLS into a CSV.
    Last edited by intlistsys; 2008-12-19 at 07:07 PM. Reason: Additional info

  8. #8
    sugarcane is offline Sugar Community Member
    Join Date
    Apr 2005
    Location
    Chicago, IL
    Posts
    1,207

    Default Re: Importing Help

    Yes, there definitely are some unpopulated fields in the "First Name" column
    this is your problem. because this field is a required field, the error will be generated whenever there is a blank cell for this field. I suggest populating any of these blank cells with '--' or 'NA' or 'Unknown' etc. The same goes for any other required field that you might have on your module.
    Intelestream has a great deal of experience hosting and customizing the SugarCRM application. Our company is made up by former employees of SugarCRM, and together we have over 50 years of experience working with the application. To learn more about us, please visit our website at www.intelestream.net or contact us directly at 800-391-4055 or by email at info@intelestream.net

  9. #9
    Rich2 is offline Senior Member
    Join Date
    Dec 2008
    Location
    Michigan
    Posts
    35

    Default Re: Importing Help

    Quote Originally Posted by sugarcane View Post
    this is your problem. I suggest populating any of these blank cells with '--' or 'NA' or 'Unknown' etc.
    If you are going to have this custom module relate to any other modules, you should try to make the data in the 'name' field be relevant, since wherever that field shows up in related modules it will be a hyperlink to that record. I would identify the most unique field in your data set and put that in the 'name' field and just change the label. If your not using relationships, then NA or Unknown will work well.

  10. #10
    intlistsys is offline Member
    Join Date
    Dec 2008
    Posts
    9

    Default Re: Importing Help

    Wow, great, thanks for your help. Now I am getting somewhere. I managed to finally bypass this error by changing the field name, and re-exposting the XLS into CSV (this time I also changed the encoding to UTF-8 [default in SugarCRM for import]) and filling in N/A for all the First Name LBL_NAME entries.

    However, now at least half the entries didn't import b/c of "string too long to fit in field" error. How can this be? I specifially made sure that there would be ample room for all the fiedls to fit well.

    Thank you so much for your help so far!

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Importing Cases
    By mmansperger in forum Developer Help
    Replies: 1
    Last Post: 2008-07-12, 03:24 AM
  2. Importing SQL into another DB
    By Deland01 in forum Help
    Replies: 2
    Last Post: 2008-06-23, 04:17 PM
  3. t i g e r paw importing
    By marrandy in forum General Discussion
    Replies: 0
    Last Post: 2006-12-29, 05:56 PM
  4. Importing new accounts
    By Danielg42 in forum Help
    Replies: 6
    Last Post: 2006-09-12, 03:17 AM
  5. Importing Goldmine
    By mtfrog77 in forum Feature Requests
    Replies: 4
    Last Post: 2006-05-01, 09:51 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •