Re: Best data import approach

2013-04-02 Thread Peter Alcibiades
Nothing like awk for dealing with records with different numbers of fields Very old fashioned but just works. -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/Best-data-import-approach-tp4662693p4662803.html Sent from the Revolution - User mailing list

Re: Best data import approach

2013-04-01 Thread Mike Bonner
Doh. Yep. I posted the wrong property for use with percents. Brain had a moment, sorry bout that. On Mon, Apr 1, 2013 at 3:32 AM, Magicgate Software - Skip Kimpel < s...@magicgate.com> wrote: > For some reason that wouldn't work for me... I ended up making it work > with: > set the dgvscrollpe

Re: Best data import approach

2013-04-01 Thread Magicgate Software - Skip Kimpel
For some reason that wouldn't work for me... I ended up making it work with: set the dgvscrollpercent of group "MyDataGrid" to 1 Thanks for all of your help! On Sat, Mar 30, 2013 at 10:58 PM, Mike Bonner wrote: > set the dgVscroll of group "yourgroup" to pPercent where pPercent is in > the f

Re: Best data import approach

2013-03-30 Thread Mike Bonner
set the dgVscroll of group "yourgroup" to pPercent where pPercent is in the form of a number between 0 and 1. Should be able to scroll it right to the bottom that way. > One last thing, is there a way to have it scroll all the way down to the > bottom of the data contained within the DataGrid

Re: Best data import approach

2013-03-30 Thread Peter Haworth
Hi Skip, It's assigned whenever you add data to the datagrid not when it's sorted, but I think it's probably easier to add your own line number to the data after the put and before the set in your script, something like put zero into x repeat for each line L in theData add 1 to x put x & tab be

Re: Best data import approach

2013-03-30 Thread Magicgate Software - Skip Kimpel
So I found the column that was being "forced" into sorting. I deleted that column and re-created it and voila! Pulling my hair out for something like this drives me crazy! One last thing, is there a way to have it scroll all the way down to the bottom of the data contained within the DataGrid i

Re: Best data import approach

2013-03-30 Thread Mike Bonner
Hmm. Not sure why its forcing your hand as far as sorting goes in the inspector. Assuming you're defined your column names theres a checkbox down low in the sorting section for each column, and to get no sorting I just make sure theres no check in the box for each column. (which is the same thing

Re: Best data import approach

2013-03-30 Thread Magicgate Software - Skip Kimpel
Mike, For sure, I don't want it sorted and as of right now. I have been using that line that you just sent this whole time but it still is being sorted when it comes into the grid. At what point should I be calling that? I have tried before and after the "set the dgText of group" Is there

Re: Best data import approach

2013-03-30 Thread Mike Bonner
You don't want it sorted? It should be popped into the datagrid in the order that the lines appear. If there is unwanted sorting going on you could try do do this after the data is imported.. *set* the dgProp["sort by column"] of *group* "DataGrid 1" to empty More info here: http://lessons.runre

Re: Best data import approach

2013-03-30 Thread Magicgate Software - Skip Kimpel
So the dgIndex is assigned after it is read in and sorted? I am using the simple technique of: > put "C:\Users\Skip\Desktop\myLog.log" into it > put url ("file:" & it) into theData > set the dgText of group "MyGrid" to theData Looks like I might need to approach this thing differently if I want

Re: Best data import approach

2013-03-30 Thread Peter Haworth
Datagrids assign a unique dgIndex which stays constant for each line after they're sorted but I don't recall any automated way to sort by it. Maybe you could just add a column to the input after you read it from your file with an incrementing number in it so it would end up as a column in the data

Re: Best data import approach

2013-03-30 Thread Magicgate Software - Skip Kimpel
Back to my sorting issue with date and time, quite honestly, the log file is already sorted I just need to have the DataGrid display it as it was read into the system with out trying to do additional sorting. Is there a way to sort, for instance, by some itemID number that the DataGrid assigns

Re: Best data import approach

2013-03-30 Thread Magicgate Software - Skip Kimpel
Thank you! http://www.fourthworld.com/embassy/articles/csv-must-die.html On Sat, Mar 30, 2013 at 5:42 PM, Alex Tweedly wrote: > Of course. You can find it best in Richard's excellent article about the > evils of CSV format, at > > http://www.fourthworld.com/**embassy/articles//csv/-/mus

Re: Best data import approach

2013-03-30 Thread Alex Tweedly
Of course. You can find it best in Richard's excellent article about the evils of CSV format, at http://www.fourthworld.com/embassy/articles//csv/-/must/-/die/.html It does deal with many of the vagaries, but won't do anything about records with different number of fields (I think that was wha

Re: Best data import approach

2013-03-30 Thread Magicgate Software - Skip Kimpel
Excellent... Thank you Pete... Alex, would you be so kind to share? SKIP On Sat, Mar 30, 2013 at 4:37 PM, Peter Haworth wrote: > Skip, > Alex Tweedly has a great handler for importing csv files that deals with > many of the gnarly issues. Hopefully he'll see this and supply it for you. > Pet

Re: Best data import approach

2013-03-30 Thread Peter Haworth
Skip, Alex Tweedly has a great handler for importing csv files that deals with many of the gnarly issues. Hopefully he'll see this and supply it for you. Pete lcSQL Software On Sat, Mar 30, 2013 at 12:38 PM, Magicgate Software - Skip Kimpel < s...@magicgate.com> wrote: >

Re: Best data import approach

2013-03-30 Thread Magicgate Software - Skip Kimpel
One last item... once again, it comes improperly formatted source data. When the datagrid loads I need to sort it by date and then by time. However, my date and time data looks like this: Mon, Feb 11 TAB9:59 AM What would be a good approach to convert these two items to a sortable format?

Re: Best data import approach

2013-03-30 Thread Magicgate Software - Skip Kimpel
I think it will be easier to go back and try to fix the source and how the data is being entered in to begin with. I realized there was a issue with one of the fields that allowed the user to enter multiple lines of data under the "notes" field. If the user hit the RETURN key to type in these not

Re: Best data import approach

2013-03-30 Thread Magicgate Software - Skip Kimpel
Thanks.. I had tried that but I was getting some funky data formatting coming in. Come to find out that the data in the log file has an occasional misplaced CR and LF embedded. Having said THAT, is there a way to strip out those characters? I know exactly how many columns I have in my field and

Re: Best data import approach

2013-03-30 Thread stephen barncard
and if the first line contains the names of the individual fields on the first row, you can put the dgText[true] On Sat, Mar 30, 2013 at 12:03 PM, Mike Bonner wrote: > set the dgtext of group "yourgroup" to URL ("binfile:/path/to/the/file") > should work. dgtext works directly with tab and cr

Re: Best data import approach

2013-03-30 Thread Peter Haworth
Hi Skip, On the face of it, reading it into a variable and setting the dgText of the datagrid to the variable seems like the simplest approach. I guess you might make a case for using an in-memory sqlite database depending on the volume of data and the complexity of the "manipulations" you want to

Re: Best data import approach

2013-03-30 Thread Mike Bonner
set the dgtext of group "yourgroup" to URL ("binfile:/path/to/the/file") should work. dgtext works directly with tab and cr delimited text, so should be easy peasy. On Sat, Mar 30, 2013 at 12:04 PM, Keith Clarke < keith.cla...@clarkeandclarke.co.uk> wrote: > Why not just put the file into a var

Re: Best data import approach

2013-03-30 Thread Keith Clarke
Why not just put the file into a variable, set the item delimiters to tab and away you go? Just query the items of the first line to understand your (changing) column labels? Best, Keith.. On 30 Mar 2013, at 17:54, Magicgate Software - Skip Kimpel wrote: > Hello LC's, > > I have a tab delim

Best data import approach

2013-03-30 Thread Magicgate Software - Skip Kimpel
Hello LC's, I have a tab delimited text file(log file) that I need to manipulate every once in a while and extract data from it. Is there a good way to read this directly into a datagrid and manipulate it from there or I am better off reading the file, loading it into a sqlite db and THEN manipul