This topic is locked
[SOLVED]

 PHPR 6.2 - Generic Import

12/18/2013 2:37:23 AM
PHPRunner General questions
A
ausmonty authorDevClub member

I am trying to work out how to have a generic import process. What I mean is that I do not know what the fields will be in the CSV import file, and the people making the import may not be able to make the adjustments to the CSV file to match the Database fields.
What I want to do is read the first line of the CSV file, which holds the CSV column names, then display a page that has the Database field names with combo boxes with all of the CSV column headers available for each DB field name. The user is then able to select which CSV header is for which DB field.
I can do this easily outside of PHPR, but I want to have this as part of a much larger PHPR 6.2 project.
Does anyone have any ideas as to how I can do this?
Gordon.

Sergey Kornilov admin 12/18/2013

I'm not quite sure what sort of integration you looking for.
You can implement this feature manually and add a link to your import page to PHPRunner menu.

A
ausmonty authorDevClub member 12/18/2013



I'm not quite sure what sort of integration you looking for.
You can implement this feature manually and add a link to your import page to PHPRunner menu.


I was just hoping that I could have the look and feel of the project, with the controls that PHP Runner automatically puts in place, without having to do a lot of the work... <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=73353&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />

Sergey Kornilov admin 12/18/2013

Well, import page don't have much controls on it, right? This is just a page with couple of buttons and a few words.

A
ausmonty authorDevClub member 12/19/2013



Well, import page don't have much controls on it, right? This is just a page with couple of buttons and a few words.


It is, and I needed a bit more complex one, but you did provide the spark for me to blend it so that it at least looks and feels like the project.
TO give me the look and feel, I just duplicated an Add page that had been generated in my own code, being in the file structure, once displayed, it appears as a project page. The multiple steps of my import, is handled in this way with the result being a process that looks like it belongs... <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=73362&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />