Page 1 of 1
Answer Thedata not yelling all selected columns
Posted: Mon Dec 25, 2017 8:47 am
by gagsoft
Hy Guys
My apologies for the spelling above it was meant to be "yielding all selected columns"
I am toying with converting database cursor into an array.
This is the code i want to put in an Answer dialog.
answer theDataA["DELEGATEIOD"] && theDataA["FIRSTNAME"] && theDataA["SURNAME"]
but it does not show the DelegateOID field which is part of the selection.
Kindly see the images attached.
There must be something I am doing wrong
Would appreciate any pointers
Many thanks
Peter G
Re: Answer Thedata not yelling all selected columns
Posted: Mon Dec 25, 2017 11:41 am
by Ajm
In the code snippet you have DELEGATEIOD and not DELEGATEOID.
Re: Answer Thedata not yelling all selected columns
Posted: Mon Dec 25, 2017 4:59 pm
by gagsoft
Hi Andy
This is what to little sleep does.
Embarrassed
Many Thanks
Peter G
Re: Answer Thedata not yelling all selected columns
Posted: Mon Dec 25, 2017 5:30 pm
by bogs
gagsoft wrote: ↑Mon Dec 25, 2017 4:59 pm
Embarrassed
I wouldn't be, that happens to everyone. Merry Christmas all
Re: Answer Thedata not yelling all selected columns
Posted: Mon Dec 25, 2017 5:42 pm
by Ajm
Happens to us all. Merry Christmas.
Re: Answer Thedata not yelling all selected columns
Posted: Mon Dec 25, 2017 7:41 pm
by gagsoft
Thanks guys for all your patience with my ignorance....
Many Thanks
Peter G
Re: Answer Thedata not yelling all selected columns
Posted: Wed Dec 27, 2017 12:08 am
by quailcreek
We haven't seen the rest of your code but here's a little function that should do the conversion you want.
Code: Select all
function turnRecordsIntoArray pData
local tHeaders,theKey
put "DELEGATEOID" & tab & "INITIALS" & tab & "FIRSTNAME" & tab & "SURNAME" into tHeaders
-- replace "xmlerr, can't find element" with "" in theData
set the itemDelimiter to tab
repeat with x = 1 to the number of lines in pData
repeat with y = 1 to the number of items in tHeaders
put item y of line x of pData into theKey[x][item y of tHeaders]
end repeat
end repeat
set the itemDelimiter to comma
return theKey
end turnRecordsIntoArray
Re: Answer Thedata not yelling all selected columns
Posted: Sun Jan 28, 2018 11:41 am
by gagsoft
Thank you Tom and the rest of the guys for the feedback.
Many Thanks
Peter G