Search found 76 matches: mapping

Return to advanced search

Re: Prestashop Mapping solution

James,

Forgotten :

I also have to put for the half of all fields standard data, not provided into the csv.

Stock = "1"
Language = "NL"
Currence = "EUR"

These data can be pre filled than into the master file, since I create 1 record with relevant data.
by Marc Venken
Sun Oct 23, 2016 12:41 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Prestashop Mapping solution
Replies: 17
Views: 9023

Re: Prestashop Mapping solution

... The csv file has a fielddata like this : Fieldname in CSV : Name with data -> "PANDS WITH A FULL COTTON INLINE IN POL/KAT" With the mapping now, I see the data in the right browse. I could put the folowing in the Masterfile field Name : "UpperLower(csv->Name)" Result ...
by Marc Venken
Sun Oct 23, 2016 12:38 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Prestashop Mapping solution
Replies: 17
Views: 9023

Re: Prestashop Mapping solution

Marc, I think with the approach of mapping the fields, you are going to have to write a routine to add each file type and each record is going to have to be added via code. If you rename the fields by posting a new header into the CSV file ...
by James Bott
Sat Oct 22, 2016 11:51 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Prestashop Mapping solution
Replies: 17
Views: 9023

Re: Prestashop Mapping solution

... aMenu:= validMenu()   local oMenu   MENU oMenu      MENUITEM "&Csv Transform" ACTION csvtransform()      MENUITEM "&Mapping data" action master()   ENDMENUreturn oMenufunction csvtransform()LOCAL hCsv, cLine, aLine, nI := 0,aFiles[ADIR("*.csv")]ADIR("*.csv", ...
by Marc Venken
Sat Oct 22, 2016 10:15 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Prestashop Mapping solution
Replies: 17
Views: 9023

Re: Prestashop Mapping solution

... on paper. If there are lots of file types (and more are expected) and lots of people are going to be doing this, then yes, I would write code. For mapping fields on screen, I would suggest two side-by-side browses both with two fields, field-order and field-name. The master file would be displayed ...
by James Bott
Sat Oct 22, 2016 5:27 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Prestashop Mapping solution
Replies: 17
Views: 9023

Re: Prestashop Mapping solution

James, I have this code so far : (Code snippeds from samples and forum) Program Menu 1 : CSV conversion from any csv to dbf file. First loop to determine the lenght of all data, the second to fill the database Limits : ONLY DELIMITED WITH ',' will work now (for my use ok for now) chekups from missin...
by Marc Venken
Sat Oct 22, 2016 12:57 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Prestashop Mapping solution
Replies: 17
Views: 9023

Re: Prestashop Mapping solution

Here is a function to read the header record of a CSV file. // Get first record of CSV file (contains fields)Function GetHeader(cFile)   Local cBuffer:= space(1000)   Local cHeader:=""   Local nHandle:=0   if file(cFile)      nHandle:= fopen(cFile,0)      cH...
by James Bott
Fri Oct 21, 2016 5:28 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Prestashop Mapping solution
Replies: 17
Views: 9023

Re: Prestashop Mapping solution

Here is a checksum() function you can use:

Code: Select all  Expand view
Function checksum( cString )
   Local nChecksum:=0, i:=0
   for I = 1 to len( cString )
      nChecksum:= nChecksum + asc(substr(cString,i,1))
   next
Return nChecksum

 
James
by James Bott
Fri Oct 21, 2016 4:29 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Prestashop Mapping solution
Replies: 17
Views: 9023

Re: Prestashop Mapping solution

Marc, I have re-read your posts and now I think I have misunderstood. It seems that each CSV file has different fieldnames and in a different order than the master file. If so, then as you stated, you will either need to restructure each file before importing it, or you will need a separate routine ...
by James Bott
Fri Oct 21, 2016 3:29 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Prestashop Mapping solution
Replies: 17
Views: 9023

Re: Prestashop Mapping solution

Marc, OK, I am not clear, but it sounds like they all have the same structure, but some of the fields may not be used. If so, this simplifies things a lot. First you need to import each file into a temp DBF. The temp DBF needs to be the same structure as the master DBF. Substitute the brackets with ...
by James Bott
Fri Oct 21, 2016 2:41 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Prestashop Mapping solution
Replies: 17
Views: 9023

Re: Prestashop Mapping solution

James, The first record from the csv has indeed always a header. I'm able to convert a csv file to a dbf but I want 1 master dbf file where all the csv-files will be imported. The csv files contains different data (every supplier has it own structure data) but I want to import them in a correct fiel...
by Marc Venken
Fri Oct 21, 2016 10:42 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: Prestashop Mapping solution
Replies: 17
Views: 9023

Re: Prestashop Mapping solution

Marc, Does the first record of the CSV files, contain the fieldnames? What do you mean when you say you want to link the DBF and CVS files? Do you want to import the files into a standard DBF format? You say the CSV files are random in structure. Do you mean they contain the same data but it might b...
by James Bott
Thu Oct 20, 2016 4:05 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Prestashop Mapping solution
Replies: 17
Views: 9023

Prestashop Mapping solution

... field. Dbf CSV Field A Data1 Field B Data2 Field C Data3 example : The data1 should go in field C, Data2 in Field A,..... I believe it is called MAPPING fields. Any part of source to show how I should proceed. The csv are random in structure, since I get them from my brands and they contain many ...
by Marc Venken
Thu Oct 20, 2016 10:37 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: Prestashop Mapping solution
Replies: 17
Views: 9023

Re: dbf at Microsoft OneDrive

I was trying to use a fivewin program of my own on the web by mapping it as a network drive with noooo luck. Finally (in windows 10) i decide to try to use onedrive without mapping any drive but, simply using the c:\pathtoLocalOnedrive\myexe.exe And booom, ...
by lorenzoazz
Mon Jan 18, 2016 10:03 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: dbf at Microsoft OneDrive
Replies: 8
Views: 2143

Re: testads.prg

... it seems to me like the tables must reside on a shared directory. For example; f:\Data\Customers.dbf (or whatever other name) and have a mapping to drive f: with read/write permissions. If this is so, then what helps you avoid a user who is working late and after exiting your app double ...
by reinaldocrespo
Thu Jun 18, 2015 10:07 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: testads.prg
Replies: 9
Views: 1812
PreviousNext

Return to advanced search