Thanks for the bug report I will look into it.
The usefulness of this is not so that it will be readable. It is so that you
can use the filter command on the result, then recreate the array with the
other function. Let's say I have a datagrid that came from a query that
returned 10,000
On Jan 28, 2012, at 5:35 AM, Peter M. Brigham, MD wrote:
if theKey is not a number then
replace [ theKey ] with [ quote theKey quote ] in
theKeyList
end if
Okay new version. Thanks to Peter M. Brigham, MD for pointing this out:
function altPrintKeys @pArray, theKeyList, pFullData
Also, in the original PrintKeys() function, if the value contained multiple
lines, it would only return the first line. My function returns all the
lines.
WHOOPS! I am mistaken here. The original version of printKeys WILL return the
full value if you pass true as the third argument. My
As an aside, here is how I implemented the kind of thing I was talking about:
-- convert the datagrid array to key text
put altPrintKeys(theDataA) into theText
-- filter the data
filter theText with tab * theValue *
-- convert the text back to an array
put
One little tweak:
instead of
if theKey is not a number then
replace theKey with quote theKey quote in theKeyList
end if
use
if theKey is not a number then
replace [ theKey ] with [ quote theKey quote ] in
theKeyList
end if
I tried it with keys like
Hi all. I just wrote an alternate form of printKeys which some may find useful.
Normally printKeys returns data in this form:
1
conferencename:
amount: 0
enddate: 2012-01-15
conferenceid: 0
siteid: 2
baseunit: day
uniqueid: 8
clientid: 0
starttime: 4
Not disputing the usefullness of your routine or what you are seeing re
dgtext/dgdata but that's NOT what I see in any of my datagrids - I see all
columns in dgText not just hidden ones. If I didn't, my apps would fail
disastrously. So let's try to figure out what's different between your
Try this in a fresh datagrid with no data:
on populateDatagrid
put text1 into theDataA[1][column1]
put text2 into theDataA[1][column2]
put text3 into theDataA[2][column1]
put text4 into theDataA[2][column2]
put column1 into theColumns
put Column 1 into theLabels
put
Here are the functions. I have tested them and they seem to be fine, but any
bug reports would be appreciated. Note that there is another distinct advantage
of these functions over the original printKeys(): These functions allow for
returns and tabs in the values. I convert them to ascii(30)