Jump to content


Photo

Stock import data - blank for default?


  • Please log in to reply
3 replies to this topic

#1 johnay

johnay

    Advanced Member

  • Members
  • PipPipPip
  • 92 posts

Posted 06 October 2005 - 07:59 AM

As I mentioned in http://momfaq.com/fo...p?showtopic=324 I'm writing a program to import item data from our shopping cart product database into MOM by having it generate a comma-delimited table to append to the stock table with dbuwin.

I've got it to the point where It's picking out the items to import that are not already there, are kits/packs, or that may require size/color data. It will display the existing stock data, new stock data, source tables (shopping cart db and Quickbooks item list), and exception items, with manual override of importability status to be added soon.

I'm currently adding the code to plug in appropriate values for each item, but there are a bunch of them for which I'll want to just go with whatever is the default.

My question: In a comma-delimited import file, is it possible to compose it so as to have certain data fields automatically set to their default value? Perhaps by not putting anything between the commas? The export file has different "null" values for different data types: "" for character. 0.00... for number, / / for date, F, presumably, for logical. Would just not having anything between the commas work? It would save me a lot of effort.

Thanks for any insight!
JA

#2 johnay

johnay

    Advanced Member

  • Members
  • PipPipPip
  • 92 posts

Posted 14 October 2005 - 05:38 AM

Well, I went the safe route and created my own list of default values. After fixing a problem with handling text fields where the source data was quoted, the program worked great, allowing us to import about 90% of our 4100+ items and telling us why it wouldn't import the rest.

There were a few false negatives such as interpreting anything with "kitten" in the name or description as possibly being a kit, and things like that, but I'd rather have false negatives making a little more manual work for us than false positives screwing up the database. Actually, out of 398 exception items, 67 could be tweaked or ignored, and 196 are sold out items that we may or may not restock. Six were rejected because their descriptions were too long for a single description field. If we decide to use both fields in our receipts & reports I'll change that to split it between words.

I also coded it so that we can run it again any time to bring in new or newly importable items. Should save us some duplication of effort down the road. Maybe some day I'll get the hang of database programming & have it access the MOM stock table directly instead of reading an exported file.

There are many things in it hard-coded for our business. Otherwise I'd post it as a download for other Softcart+MOM users.

#3 Videoflicks2004

Videoflicks2004

    GLOBAL MODERATOR

  • Moderators
  • PipPipPip
  • 241 posts
  • Gender:Male
  • Location:Canada
  • Interests:~ DVD ~ BLUE RAY ~ HD DVD ~ HOLOGRAPHIC DVD ~ Quantum Computing.

Posted 15 October 2005 - 07:59 AM

Well, I went the safe route and created my own list of default values. After fixing a problem with handling text fields where the source data was quoted, the program worked great, allowing us to import about 90% of our 4100+ items and telling us why it wouldn't import the rest.

There were a few false negatives such as interpreting anything with "kitten" in the name or description as possibly being a kit, and things like that, but I'd rather have false negatives making a little more manual work for us than false positives screwing up the database. Actually, out of 398 exception items, 67 could be tweaked or ignored, and 196 are sold out items that we may or may not restock. Six were rejected because their descriptions were too long for a single description field. If we decide to use both fields in our receipts & reports I'll change that to split it between words.

I also coded it so that we can run it again any time to bring in new or newly importable items. Should save us some duplication of effort down the road. Maybe some day I'll get the hang of database programming & have it access the MOM stock table directly instead of reading an exported file.

There are many things in it hard-coded for our business. Otherwise I'd post it as a download for other Softcart+MOM users.

View Post



Hey JA,

Are you fimiliar with VB coding? I've got an app that needs some tweaking. If so, I'll exchange the source code for your help fixing it up.

Cheers,

Videoflicks2004
David Narciso
Ecommerce Operations Manager CVS Inc

[email protected]

mobile: 4168238175

DISCLAIMER: Always backup your MOMWIN folder before attempting to perform any updates, testing, etc. Once you blast the data away it's gone forever.
My advice is based on my 8 years of experience with MOM and Dydacomp. If you are not comfortable with data manipulation then hire someone who is.

#4 johnay

johnay

    Advanced Member

  • Members
  • PipPipPip
  • 92 posts

Posted 17 October 2005 - 06:27 AM

Hey JA,

Are you fimiliar with VB coding?  I've got an app that needs some tweaking.  If so, I'll exchange the source code for your help fixing it up.

Cheers,

Videoflicks2004

View Post


Nothing beyond VB5 (though I've used just about every MS basic before that since BASICA), and mostly just hobby & minor utility programming.

Time is an issue as well. I've pretty much got my plate full right now.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users