BOM Import Mapping - Required Mapping Fields

767 views
Skip to first unread message

khuff...@gmail.com

unread,
May 31, 2017, 9:17:04 PM5/31/17
to PartKeepr Users
I am having issues successfully importing a CSV BOM file into a Partkeepr (ver 1.2.0) project.  I can set the required mapping fields to values that clear any error messages, but the import button doesn't import the file and there is nothing in the preview tab.  I don't believe I'm mapping the fields correctly.  The required "NAME" field is mapped to my manufacturer's part number.  I'm not certain how to assign "Category" and "Part" map fields (required).  I currently have them set to "Don't Set".  Can someone share an example of a BOM import or tell me how to set these fields?

Thanks in advance,
Kevin

Nathan Hartman

unread,
Jun 5, 2017, 10:25:34 AM6/5/17
to PartKeepr Users, khuff...@gmail.com
I did the same thing in my installation and I noticed something weird. It appeared that nothing was being imported from the CSV BOM into the Project.

First of all it took some experimentation to set up the import properly. There are tabs called Preview and Errors at the bottom of the Import window. The import was properly set up when Preview contained a reasonable list of what would be changed, and all Errors were removed.

Still, pushing Execute Import did not appear to work. All I got was a popup window that listed the same actions as the Preview tab, but the Project appeared unchanged.

After more experimentation, I found that the data WAS imported, just the Project view is not refreshed so you don't see it immediately. I found that if I push Execute Import, close the popup, and close the Projects view WITHOUT pushing Save Project, and then reopen the Projects view, the data shows up.

Note that if you pushed Execute Import several times, each entry will show up several times once you close and reopen Projects.

I think this is a bug.

khuff...@gmail.com

unread,
Jun 6, 2017, 9:32:49 PM6/6/17
to PartKeepr Users, khuff...@gmail.com
Thanks Nathan.  I really appreciate your feedback.  There are a few map fields that are marked as required inputs. One of them is "Parts"  This appears to be a parent container for parts attributes.  The Part - Name attribute (also required) I mapped to my import data manufacturer part number.  The Part container itself I'm not sure what to map against. When I highlight the "Part" container, I select the option to "map import data against existing data" and select "add field"  I don't know what field to add from the project and what to map this against on the import data.  Should I select "name" and manufacturer part number again?  This appears to be a redundant selection with the required "name" field listed immediately below the "Part" folder (container).  Any help you could provide on this would be GREATLY appreciated.  

jpat...@gmail.com

unread,
Sep 27, 2017, 9:29:37 AM9/27/17
to PartKeepr Users
Did you ever get this to work? I am having similar problems - I have been able to import my CSV BOM file and have selected 'Match import data with selected data' - choosing 'name' as the match field and selecting the Part Name column in my BOM (has def got components in the BOM that are on the DB). I am not clear about how the update and import settings work. I am also not clear about what to do with the 'Category' selector.

I have managed to clear the error count but the preview pane shows nothing and the import fails (even after doing the close without save trick mentioned). I have tried most combinations that I can think of but no luck - either on my own system (running on Apache on macOS 10.12) or on the Partkeepr live website.

I like the Partkeepr setup and it should be very powerful but it has not been entirely straightforward to set up and the BOM import is one of the main reasons I wanted to use Partkeepr so this is kind of a deal breaker if it won't work.

BW

John

khuff...@gmail.com

unread,
Oct 5, 2017, 8:17:28 PM10/5/17
to PartKeepr Users
I've answered my own question but am posting here for others who may need the info.  This was used on Partkeepr 1.2.0 and has been verified on 1.3.0 as well.  Installations were running on  Red Hat Linux and Linux Mint (two different installations):

Attached is one of my short BOMs that I successfully imported.  Note:  The Manufacturer data isn't used in the import.

Before attempting to map the project:
Go to the Project window and click "Add Project" symbol
Create a project name (description optional).  Click "Save Project".  This creates the project name that will be needed later.

Here's the mapping I used:

PartKeepr.ProjectBundle.Entity.Project  - Set to "Always Import"
PartKeepr.ProjectBundle.Entity.Project -> quantity    - Set to Copy Contents from - Qty
PartKeepr.ProjectBundle.Entity.Project -> remarks    - Set to Copy Contents from  - Refs
Part (folder) - Match import data with existing data using - (then select Add - then select the "Name" parameter from the "Category" folder).  Under the "Import Field" option, select "Man#" 
    Set Behavior when item exists - "Don't Update"
    Set Behavior when item does not exist  - "Stop Import"
Part - Name - Set to Copy Contents from - "Man#"
Category (folder) - Match import data with existing data using - (then select Add - then select the "Name" parameter from the "CategoryPartKeeprBundleEntityParts" folder).  Under the "Import
                                    Field" option, select "Part Type"
(When Category is set as described below, no category information is needed in the BOM)
Category (folder) - Set to "Always set to"  Click on "Select Entity" and select "Name" from the right column list.  When the results list appears on the left side, select "Root Category"
Category ->name - Set to "Ignore"
Project (Folder) - Set to "Always set to"  Then press "Select entity" - Under "PartKeepr.ProjectBundle.Entity.Project" - select "Name" field.  The project name you saved should appear in the left pane.  If not, click the blue "Refresh" arrows at the bottom of the window.  Select your project name.  Press "Select Entity"

After completing the steps above you should have no errors on the error tab.  At this point, you can select the "Preview" pane to view how the import will behave.  Hint:  You can save the configuration settings by clicking on the green '+' on the bottom of the import window and naming the mapping settings.  In the future you only need to reassign the project name, but future BOM imports must have the columns in the same order as used for this mapping (i.e. Refs in column 1; Man# in column 2, etc).

Look in the preview for anything that will terminate the import.  Some things that will:
Part not in the database
Duplicate locations for the same part
Part category not defined

If no errors, then it should import your BOM.  After clicking "Execute" a popup window will appear that shows the same as the preview.  Close the project window WITHOUT SAVING; then reopen and the import should show your parts for the project.  It is now safe to save the project.

Sample BOM (.csv format):

Refs Manf# Qty
J1 20021321-00010C4LF 1
P1 20021121-00010C4LF 1
J2 10104110-0001LF 1
U1 FT232RL 1
C1 MC0805N101J500CT 1
C2-C5 MC0805B104K250CT 4
C6 C2012Y5V1E475Z 1
R1 RC0805JR-104K7L 1
R2 RC0805JR-1310KL 1
R3, R4 CRCW0805140RFKEA 2
R5-R8 CRCW08050000Z0EB 4
D1 LGQ971 1
D2 LSQ976-Z 1

On Wednesday, May 31, 2017 at 9:17:04 PM UTC-4, khuff...@gmail.com wrote:

khuff...@gmail.com

unread,
Oct 5, 2017, 8:19:54 PM10/5/17
to PartKeepr Users
The following comment in the instructions is in reference to an older BOM sample.  Ignore for the example listed:

 Note:  The Manufacturer data isn't used in the import.

On Wednesday, May 31, 2017 at 9:17:04 PM UTC-4, khuff...@gmail.com wrote:

khuff...@gmail.com

unread,
Feb 6, 2018, 8:13:47 PM2/6/18
to PartKeepr Users
A final post on this topic - I am now able to include items in my BOM that are not in the database.  The parts are added to the project & new part entries are created in the database.  Here's the additional fields to set for adding new parts in Partkeepr via a BOM import:

-  Part (folder) - Part is matched against Manufacturer Part Number (as before),  Also in this window, "Behavior if part does not exist" - Set to Create New Entry
-  Category (folder) - Select "Always set to" (Select Entry) - Select "Name" and the category where you wish new parts to be stored (from the list).  If you wish, you can create a category specifically for new parts (will not 
       impact import of existing parts).
-  Storage Location (folder) - "Always Set to" (Select Entry) - It is best to create a storage location specifically for the new parts (i.e. NewParts or TBD, etc).  Again, this will not impact BOM import of parts that existing 
       parts.
- Part Unit (folder) - Select "Always Set to" (Select Entry) - Select "Name" and "Pieces" entry.

The preview should show the creation of new part entries for parts not currently in the database with the assigned category and location as described above.

erlend....@gmail.com

unread,
Mar 1, 2019, 5:57:09 AM3/1/19
to PartKeepr Users
Hi!

Have you tried the solution you posted above on PartKeepr 1.4.0? I'm following the instructions, and I'm able to import without error, but the parts don't show up, and it doesn't work to close and reopen the "Projects" window.

Best regards,
Erlend

khuff...@gmail.com

unread,
Mar 1, 2019, 6:47:58 AM3/1/19
to PartKeepr Users
Hi!

Yes, it works fine for me with Partkeepr 1.4.  Please verify the following field is set on your import

- Part Unit (folder) - Select "Always Set to" (Select Entry) - Select "Name" and "Pieces" entry.  This field is described in a follow-up post I submitted above. 

This assumes the units for your parts (in the database) are set to "Pieces" and assumes all parts imported are also compatible with "Pieces" unit types.  The only instances I can think of where this would not be the case is if you are importing spools of wire (feet / meters) or some other bulk consumable.    Regardless, the database will exhibit the behavior described if the Parts Units aren't set.

If this doesn't work then please post a screen shot of your import "Preview" window along with a screen shot of one of your parts in the database (that is matched against your BOM).

Regards,
Kevin
Message has been deleted

erlend....@gmail.com

unread,
Mar 1, 2019, 11:06:38 AM3/1/19
to PartKeepr Users
Thank you for your help and fast reply!

I got it working now, I had missed a minor thing.

Best regards,
Erlend

khuff...@gmail.com

unread,
Mar 1, 2019, 5:38:49 PM3/1/19
to PartKeepr Users
Glad it worked out.  Did you get the copy of the user manual I sent?  If so, it has detailed instruction with lots of screen shots.  Feedback on the manual would be appreciated.

Kevin

john.ow...@electricityexchange.ie

unread,
Mar 3, 2019, 9:25:56 PM3/3/19
to PartKeepr Users
Hi Kevin, 
I would love to give you feedback on the manual :)

I'd love to read it 

Best regards

John

erlend....@gmail.com

unread,
Mar 13, 2019, 3:44:52 AM3/13/19
to PartKeepr Users
Where did you send the user manual? I haven't seen it

Erlend
Message has been deleted
Message has been deleted

Scott Nette

unread,
Apr 22, 2020, 4:15:39 PM4/22/20
to PartKeepr Users
I found this post to be very helpful, but it looks to be out of date.  I was following along to this reply below:

I think the issue I am having is related to this 
"Project (Folder) - Set to "Always set to"  Then press "Select entity" - Under "PartKeepr.ProjectBundle.Entity.Project" - select "Name" field.  The project name you saved should appear in the left pane.  If not, click the blue "Refresh" arrows at the bottom of the window.  Select your project name.  Press "Select Entity""

I'm running into 2 issues:
  1. If I have 10 items in my BOM that I am importing, I will get 10 projects generated with no Project Parts listed
  2.  Or if I change the settings around a bit, I will have 1 Project but nothing will be in my Project Parts.

My preview window is only showing "Set field name to fixed value ProjectTest" for each item in my BOM.  Not sure which setting I am messing up.  I've been clicking around quite a bit, but can't get it so all the parts fall under 1 selected Project.  
I can't find the Project folder I quoted above and it seems like that is what I am missing?


khuff...@gmail.com

unread,
Apr 22, 2020, 8:21:12 PM4/22/20
to PartKeepr Users
Hi Scott,  you should have received an email from me with a copy of the user manual I wrote.  I provides detailed step by step instructions on how to do a BOM import, along with copious screen shots.  Let me know if you didn't get the manual.  It isn't immediately clear what you are doing wrong, but I think the manual is the easiest way to clear up any errors. 

Best regards,
Kevin

Nathan Hartman

unread,
Apr 22, 2020, 8:52:07 PM4/22/20
to PartKeepr Users
On Wednesday, April 22, 2020 at 8:21:12 PM UTC-4, khuff...@gmail.com wrote:
Hi Scott,  you should have received an email from me with a copy of the user manual I wrote.  I provides detailed step by step instructions on how to do a BOM import, along with copious screen shots.  Let me know if you didn't get the manual.  It isn't immediately clear what you are doing wrong, but I think the manual is the easiest way to clear up any errors. 

Best regards,
Kevin


Hello Kevin,

Would you be able to send me a copy of the manual? I was just trying to do a BOM import yesterday and after messing with it for a long time, I finally gave up and just put the parts in one by one...

Thanks!

Nathan
 

Scott Nette

unread,
Apr 22, 2020, 10:01:26 PM4/22/20
to PartKeepr Users
Kevin,

Thank you for sending that over, very helpful!  Very tricky to get it working, but I think I see what I was doing wrong.  Seems like one of those things you save a preference for and it should be good for a long while.  
 It took a little bit for me to find the email because it was sent to spam... but your first email didn't.
I very much appreciate you sending it over.  The next challenge it looks I will be tackling is getting a scanner to work how I envision it.  

Thanks,
Scott

gilber...@gmail.com

unread,
Jul 22, 2020, 1:40:26 PM7/22/20
to PartKeepr Users
I am trying to import my data into Partkeepr and am having no luck.  I can get it to see the file and I can even get rid of the 2 errors that the import process starts with.  I am just not able to get it to actually import the data.  I have even had a window pop up after hitting Execute import with the same data that is in the preview window but nothing is actually in the application.  

I get one of 2 errors in preview now.  Either "The key importBehaviour does not exist for path /!" or "The part has no category assigned"  even though the description key of the category folder is selected and connected to the description in the CSV file. I only have 4 columns of data in my CSV file. They are partname, location, quantity and description.  

Can someone please help me so I don't have to import over a hundred different parts when this should be able to import something so simple? I can't believe that it is this difficult. We should be able to just match the keys with the data in the files and import them but no it just doesn't work like that. It has errors but the errors don't specify what exactly in category needs to be linked like it does in the parts because at least there it says name. 

HHHHEEEEEELLLLLLLPPPPPPP!!!!!!

gilber...@gmail.com

unread,
Jul 22, 2020, 2:04:27 PM7/22/20
to PartKeepr Users
Here is a picture that I am getting in the Preview tab when I am trying to import in the Part Manager not as a project. 

partkeepr-failed-import.JPG

Message has been deleted

gilber...@gmail.com

unread,
Jul 22, 2020, 2:09:32 PM7/22/20
to PartKeepr Users
From the partkeepr.log

[2020-07-22 19:59:33] request.CRITICAL: Uncaught PHP Exception Dunglas\ApiBundle\Exception\InvalidArgumentException: "No route matches "undefined"." at /var/www/html/vendor/dunglas/api-bundle/Api/IriConverter.php line 76 {"exception":"[object] (Dunglas\\ApiBundle\\Exception\\InvalidArgumentException(code: 0): No route matches \"undefined\". at /var/www/html/vendor/dunglas/api-bundle/Api/IriConverter.php:76, Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code: 0):  at /var/www/html/app/cache/prod/appProdProjectContainerUrlMatcher.php:3087)"} []
[2020-07-22 19:59:33] request.CRITICAL: Uncaught PHP Exception Dunglas\ApiBundle\Exception\InvalidArgumentException: "No route matches "undefined"." at /var/www/html/vendor/dunglas/api-bundle/Api/IriConverter.php line 76 {"exception":"[object] (Dunglas\\ApiBundle\\Exception\\InvalidArgumentException(code: 0): No route matches \"undefined\". at /var/www/html/vendor/dunglas/api-bundle/Api/IriConverter.php:76, Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code: 0):  at /var/www/html/app/cache/prod/appProdProjectContainerUrlMatcher.php:3087)"} []


On Wednesday, July 22, 2020 at 11:06:42 AM UTC-7, gilbe...@gmail.com wrote:

partkeepr-failed-import.JPG

Take 2. I"m not sure why it won't let me post a picture on here. I can't copy the text unfortunately in the Preview tab so that is useless. The picture is supposed to be of what is seen there but it isn't posting. 


On Wednesday, July 22, 2020 at 10:40:26 AM UTC-7, gilbe...@gmail.com wrote:

khuff...@gmail.com

unread,
Jul 22, 2020, 9:23:57 PM7/22/20
to PartKeepr Users
I sent you a copy of my user manual, via email,  that goes through a BOM import in detail.  Let me know if you still have issues.
Regards
Kevin

Christian Wolf

unread,
Jul 23, 2020, 1:49:27 AM7/23/20
to partkee...@googlegroups.com
Hello Gilbert,

if you continue to struggle with the import after you read the manual of
Kevin, it is possible that this is caused by a bug. You were right about going
to Github to report it, although you should have opened a new issue to keep
things apart. But that's another story.

If you really need to add some parts into PK from a CSV or other text-based
file, you could as well make a set of SQL queries out of it. I know some users
access the database below PK directly for their own scripts. You will have to
reload the web page but that should not be a big deal.

This will for sure not allow a fine-grained setup of all sort of stuff like
images, manufacturer meta data etc but the basic information should be able to
be inserted into the DB.

Unfortunately, we are a bit short of manpower. This is the reason, why we were
not really able to help you out. First point on our agenda is the upgrade of
the underlying framework. This will allow the development to start in the
community again...

So, in case you need advice how to access the database directly, send me a
short message.

Christian




Gilbert PE

unread,
Jul 23, 2020, 10:19:01 AM7/23/20
to Christian Wolf, partkee...@googlegroups.com
okay I guess the biggest things are where exactly would I enter the information if I have four points of data. 1) is the part number, 2) description, 3) location and 4) quantity.  When I am trying to import the data I'm not finding the location key that I would use anywhere in it. There's a name under location but it's not really a name it's a location.



khuff...@gmail.com

unread,
Jul 23, 2020, 11:55:43 AM7/23/20
to PartKeepr Users
In the Import window, select the StorgeLocation mapping field (on the left side); looks like a folder.  Under "Configuration" select "match import data with existing data using" then select "Add" to add the StorageLocation - Name" to the match field.  The import field will be the header for your location field.

In the same configuration screen you can configure options on creating storage locations if they don't exist (behavior when item doesn't exist).

I haven't tested this, but it should be the correct configuration.

Best regards
Kevin

khuff...@gmail.com

unread,
Jul 23, 2020, 5:05:38 PM7/23/20
to PartKeepr Users
If you are attempting to create both new storage locations and new part entries in a single import, I don't think this is permissible.  You should import your storage locations first - Edit - Storage Location - Import (double arrow at the bottom of the page) - then import your list of storage locations.  Once those are imported, you can go back and import the parts.  NOTE:  When you do the Storage Location import, I believe you will need to set the storage location category to ROOT (Always set to - select entity then root).  This assumes you don't have the locations broken into categories.

I believe the error you are getting is resulting from the database attempting to create a new part entry with an undefined location.

Regards
Kevin

On Thursday, July 23, 2020 at 10:19:01 AM UTC-4, Gilbert PE wrote:

khuff...@gmail.com

unread,
Jul 23, 2020, 8:54:19 PM7/23/20
to PartKeepr Users
I didn't initially realize what you were asking.  You have to import the locations first via Edit - Location - Import.  Once that is complete, you can import the remaining fields via the Part Manager - Parts List Screen.  Two non-obvious requirements on the Parts import - You must define the Parts Units (typically fixed value of Pieces) and either assign a fixed category (my example was Root) or include the category listing in your import.  I emailed you screen shots that walk through the two imports.

I'll try to post explicit directions for others later this weekend.
Kevin

Gilbert PE

unread,
Jul 23, 2020, 9:41:31 PM7/23/20
to khuff...@gmail.com, PartKeepr Users
I guess I have the question of I already imported all of the parts how do I fix this after already having done that and still wanting the locations correct?



Chetan Soni

unread,
Feb 14, 2021, 6:01:39 AM2/14/21
to PartKeepr Users
Hi Kevin,
can you send the manual to my mail, it will be helpful.

Kevin Huffman

unread,
Feb 14, 2021, 7:26:58 AM2/14/21
to PartKeepr Users

Daniel has kindly moved the manual online.  It can now be accessed via:  https://readthedocs.web.cern.ch/

Daniel Calcoen

unread,
Mar 2, 2021, 4:48:22 PM3/2/21
to PartKeepr Users
The full manual

the chapter for entering part explaining the mechanism of the import procedure

the step by step to import the BOM (projects) with the tips

Regards
Daniel
Reply all
Reply to author
Forward
0 new messages