Answer Thedata not yelling all selected columns

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: Klaus, FourthWorld, heatherlaine, kevinmiller

Post Reply
gagsoft
Posts: 102
Joined: Sat Jun 29, 2013 7:56 pm

Answer Thedata not yelling all selected columns

Post by gagsoft » Mon Dec 25, 2017 8:47 am

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.
Grid.png
Screen Shot 2017-12-25 at 09.48.01.png
There must be something I am doing wrong
Would appreciate any pointers

Many thanks
Peter G

Ajm
Posts: 5
Joined: Tue Mar 04, 2014 7:21 pm

Re: Answer Thedata not yelling all selected columns

Post by Ajm » Mon Dec 25, 2017 11:41 am

In the code snippet you have DELEGATEIOD and not DELEGATEOID.
Regards

Andy
DB Integration Limited

gagsoft
Posts: 102
Joined: Sat Jun 29, 2013 7:56 pm

Re: Answer Thedata not yelling all selected columns

Post by gagsoft » Mon Dec 25, 2017 4:59 pm

Hi Andy
This is what to little sleep does.
Embarrassed :?

Many Thanks
Peter G

bogs
Posts: 1183
Joined: Sat Feb 25, 2017 10:45 pm

Re: Answer Thedata not yelling all selected columns

Post by bogs » Mon Dec 25, 2017 5:30 pm

gagsoft wrote:
Mon Dec 25, 2017 4:59 pm
Embarrassed
I wouldn't be, that happens to everyone. Merry Christmas all :D
ImageImage

Ajm
Posts: 5
Joined: Tue Mar 04, 2014 7:21 pm

Re: Answer Thedata not yelling all selected columns

Post by Ajm » Mon Dec 25, 2017 5:42 pm

Happens to us all. Merry Christmas.
Regards

Andy
DB Integration Limited

gagsoft
Posts: 102
Joined: Sat Jun 29, 2013 7:56 pm

Re: Answer Thedata not yelling all selected columns

Post by gagsoft » Mon Dec 25, 2017 7:41 pm

Thanks guys for all your patience with my ignorance....

Many Thanks
Peter G

quailcreek
Posts: 676
Joined: Sun Feb 04, 2007 11:01 pm
Location: McKenna, WA

Re: Answer Thedata not yelling all selected columns

Post by quailcreek » Wed Dec 27, 2017 12:08 am

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 
Tom
MacBook Pro OS High Sierra 10.13.3

gagsoft
Posts: 102
Joined: Sat Jun 29, 2013 7:56 pm

Re: Answer Thedata not yelling all selected columns

Post by gagsoft » Sun Jan 28, 2018 11:41 am

Thank you Tom and the rest of the guys for the feedback.

Many Thanks
Peter G

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”