line delimited list
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
line delimited list
Hello,
I would like to see the line delimited list of columns in my FORM dg ...?
thx
I would like to see the line delimited list of columns in my FORM dg ...?
thx
Re: line delimited list
Hi link76,
you need to loop through the datgrid array!
Something like this, I use only three columns in my example,
you need to use of course the names of YOUR columns in the datagrid!
Hint:
If one of your columns contains MULTILINE text, this will of course "break" the list a bit
Best
Klaus
you need to loop through the datgrid array!
Something like this, I use only three columns in my example,
you need to use of course the names of YOUR columns in the datagrid!
Code: Select all
on mouseUp
## Get the datagrid data, which is an array:
put the dgdata of grp "your datagrid here" into tData
## We use the KEYS of that array (1 to N), which is a CR delimited list, for the following loop
put the keys of tData into tKeys
## we use tis variable for the text list:
put empty into tTextList
## here we create a simple (test) TAB and CR delimited list from the array data
repeat for each line tKey in tKeys
put tData[tKey]["column 1"] & TAB & tData[tKey]["column 2"] & TAB & tData[tKey]["column 3"] & CR after tTextList
end repeat
## get rid of trailing CR
delete char -1 of tTextList
## Now display list in a field
put tTextList into fld "whatever"
end mouseUp
If one of your columns contains MULTILINE text, this will of course "break" the list a bit
Best
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 253
- Joined: Fri Dec 09, 2011 11:17 am
- Location: Warszawa / Poland
Re: line delimited list
put the dgText of grp "DataGrid" into fld "Field"
should work for any count of columns.
Marek
should work for any count of columns.
Marek
Re: line delimited list
"dgtext" does really work with a FORM datagrid?
-
- VIP Livecode Opensource Backer
- Posts: 253
- Joined: Fri Dec 09, 2011 11:17 am
- Location: Warszawa / Poland
Re: line delimited list
Why not? I didn't use FORM yet, but didn't find any info it should not work.
By the way, are there columns in DataGrid FORM?
Marek
By the way, are there columns in DataGrid FORM?
Marek
Re: line delimited list
Hi Marek,
hmmm, true!
I think that I always associate a datagrid of type TABLE with ONE-line data and a datagrid
of type FORM with MULTI-line data, where a TAB and CR delimited list will not make much sense.
But obviously we can also use dgtext with FORMs, too.
@link76
So just try:
...
put the dgtext of grp "your FORM datagrid here..." into fld "the field with some TABstops in it"
...
Best
Klaus
hmmm, true!
I think that I always associate a datagrid of type TABLE with ONE-line data and a datagrid
of type FORM with MULTI-line data, where a TAB and CR delimited list will not make much sense.
But obviously we can also use dgtext with FORMs, too.
@link76
So just try:
...
put the dgtext of grp "your FORM datagrid here..." into fld "the field with some TABstops in it"
...
Best
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 253
- Joined: Fri Dec 09, 2011 11:17 am
- Location: Warszawa / Poland
Re: line delimited list
So 1 small beer for me
Marek
Marek
Re: line delimited list
YES!
I was very surprised that in bars in Portugal they really sell "um fino", which is a 0.1 liter glass of beer!
Still wondering what that's good for
I was very surprised that in bars in Portugal they really sell "um fino", which is a 0.1 liter glass of beer!
Still wondering what that's good for
-
- VIP Livecode Opensource Backer
- Posts: 253
- Joined: Fri Dec 09, 2011 11:17 am
- Location: Warszawa / Poland
Re: line delimited list
In our country small beer is min. 0,33 l
Marek
Marek
Re: line delimited list
Hi Marek,
you are czech, right?
Well, that is no wonder, it is the country of origin of all the beer in the world
Best
Klaus
you are czech, right?
Well, that is no wonder, it is the country of origin of all the beer in the world
Best
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 253
- Joined: Fri Dec 09, 2011 11:17 am
- Location: Warszawa / Poland
Re: line delimited list
50% / 50%
Czech beer is known on all over the word.
I'm from Poland. We have also our own good beer.
Marek
Czech beer is known on all over the word.
I'm from Poland. We have also our own good beer.
Marek
Re: line delimited list
Oh, sorry, but I was quite near
-
- VIP Livecode Opensource Backer
- Posts: 253
- Joined: Fri Dec 09, 2011 11:17 am
- Location: Warszawa / Poland
Re: line delimited list
Yes, for me only about 450 km to boarder / 8-9 hours of drive (terrible roads and a lot of police radars). But we can drink this beer in Germany - the same 450 km to the boarder, but new speedway only 4 hours.
Marek
Marek