Data imported seems different in Datagrid and through Text tab.

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
teriibi
Posts: 254
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

Data imported seems different in Datagrid and through Text tab.

Post by teriibi » Mon Nov 13, 2017 4:02 pm

Hi,

I just want to make sure my imported (CSV using comas) data content is consistently "recorded in Livecode".

I tend to beleive that the TEXT tab of the Datagrid property SHOULD display the real data stored in LC.

So..does anyone know why the Datagrid imported data seems perfect while the TEXT content shows
records of column age that seems to be joined within the column email (email + age) and empty last column on some line.. ? :shock:

should I trust the datagrid for what it dispalys ? :?:
...or is there some REAL inconsistency in the TEXT property content of the Datagrid ?
+See picture,

What real consistent format do YOU use yourself to import some Data into Livecode ???

Thanks to those who have been going through this "funny" stuff
Terii :)
Attachments
IMPORTED AND TEXT OPTION TAB CONTENT .png

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Data imported seems different in Datagrid and through Text tab.

Post by Klaus » Mon Nov 13, 2017 6:38 pm

Hi Terii,

1. welcome to the forum!

2. I would trust the datagrid! :D

Are we sure that the "Content" field in the inspector for the datagrid is really set up correctly with all possible TAB stops?

I don't think so, so you are lucky with the first couple of lines/TABs aligning nicely but "Kris Merrier" has a short email address so the age and whatever comes after looks like misaligned, but you can see that there is no SPACE, that would be smaller, so it must be a TAB.


Best

Klaus

teriibi
Posts: 254
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

Re: Data imported seems different in Datagrid and through Text tab.

Post by teriibi » Mon Nov 13, 2017 9:28 pm

Ok, I did a few test, made some longer emails and Fname...and somethines it works and s/t not. :?
I though about a lenght factor - but it should not have an impact. "Normaly"

I working with a CSV file with comas. (not a Tab one)
I adapted a script replacing comas that is like this:

Code: Select all

   
   put line 1 of tFileCont into tColumnTitles    ## Creates Columns from the contents of the CSV's first line 
   replace comma with return in tColumnTitles
   set the dgProp["columns"] of group "Datagrid1" to tColumnTitles
   delete line 1 of tFileCont
   replace "," with tab in tFileCont
   Put tFileCont into field "text"
   set the dgText of group "Datagrid1" to tFileCont
   
Still, I don´t know how to code it - if ever possible - so it would directly import from CSV to the Datagrid with less Steps possible creating errors...

Else. I don t know where to look for refeering to some TABS modification,

Now I ll keepup with the EXPORTING-REIMPORTING procedures and sees if it affects also any exporting-reimporting consistency - if its only aestetical - it not - it should be ok for now.
Tks

:

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”