Delimited Data
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Delimited Data
I am trying to format returned text. I have sent off an array to a server and using the get command retrieve that data. The data at that point I can post to a field but I would like to format it into a more readable format. The data is delimited by a bar "|". Is there a way to "hit return after bar"? Is there a way to add a tab between two items that exist on the same line? The data will not be stagnant. Example of what returned data would look like... admin,10|ryan,7|username,5|testuser,2|adminiatrator,0|
Thanks for the help!
Kaubs
Thanks for the help!
Kaubs
Re: Delimited Data
Well...I figured out that I can issue a command to replace data...but formatting still seems a bit quirky.
I used "replace "|" with return" and that takes care of the next line operation...but since my text has a comma I would really like to separate any data after the comma to be right aligned...Can something like this be forced?
I used "replace "|" with return" and that takes care of the next line operation...but since my text has a comma I would really like to separate any data after the comma to be right aligned...Can something like this be forced?
Re: Delimited Data
Hi Kaubs,
"Normal" fields (includig the "pseudo" TABLE field) can only have ONE alignment: left center or right! And nothing else!
So the only way for you would be to use a DataGrid.
That can be set up to have different alignments in every column!
But you can additionally "replace COMMA with TAB" in YourData" to prepare the data for display in a DataGrid.
Best
Klaus
Yep! Sad, but true!Kaubs wrote:Well...I figured out that I can issue a command to replace data...but formatting still seems a bit quirky.
"Normal" fields (includig the "pseudo" TABLE field) can only have ONE alignment: left center or right! And nothing else!
So the only way for you would be to use a DataGrid.
That can be set up to have different alignments in every column!
See above.Kaubs wrote:I used "replace "|" with return" and that takes care of the next line operation...but since my text has a comma I would really like to separate any data after the comma to be right aligned...Can something like this be forced?
But you can additionally "replace COMMA with TAB" in YourData" to prepare the data for display in a DataGrid.

Best
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 10044
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Delimited Data
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Delimited Data
kk....so I had the PHP guy change the commas out server side to be tab spaced for me..less thinking for the program I figured. Anyways... the data I'm working with is simple in that I only have 2 columns. The field itself I specified to shift the 2nd column 200px from the left using the tabstops function. The problem Im seeing now is that like 5 of my 8 results format properly and the other 3 seem to ignore the tabstops...Am I doing something wrong??
Re: Delimited Data
Hi Kaubs,
can't tell without looking at your script(s)!
can't tell without looking at your script(s)!

Re: Delimited Data
Thanks for all your help guys! I was fighting an idiot move I made...for some reason some of the data moved and some of it didn't. The script is a 2 liner, gets the data from a url and then spits it in a field. The problem wasn't that the field wasn't working properly it was that I had moved from a lower res card to a higher res card in my mainstack. I had been trying to apply 200px tabstops to a card that needed 400px. Livecode was working perfectly and this is just another case of the program doing what I told it and me being blind to it. I found my fix by turning on the horizontal grid and vertical grid to find exactly where the text was separating. Sometimes you just need to step away and have some lunch lol.....

