I need some advice. I'm trying to pass all the data of a single row in my datagrid to a command called "CustomerContactEdit" which is in another stack. I've got the code below, can someone advise me as to where I am going wrong. Its driving me potty. I can seem to extract a field and pass that through, but not the whole row.
The code below is attached to my datagrid which contains the rows of data.
Code: Select all
on mouseDoubleUp
get the dgHilitedLines of me
EditRecord it
end mouseDoubleUp
on EditRecord pLineNumber
local tRecordA, pContactID
put the dgDataOfLine[pLineNumber] of me into tRecordA
--put tRecordA["contactID"] into pContactID
if pContactID is empty then exit EditRecord
-- I cant seem to get contents of tRecordA to pass to the ContactForm command which is in the CustomerContactEdit
send "ContactForm " & tRecordA & comma & pLineNumber to the card "CustomerContactEdit" of the stack "CustomerContactEdit" in 1 milliseconds
set the loc of stack "CustomerContactEdit" to the loc of this stack
modal stack "CustomerContactEdit"
show stack "CustomerContactEdit"
end EditRecord
Code: Select all
command ContactForm tRecordA, pLineNumber
put tRecordA["contactID"] into field "fld_contact_id"
put tRecordA["customerID"] into field "fld_customer_id"
put tRecordA["title"] into field "fld_title"
put tRecordA["firstname"] into field "fld_firstname"
put tRecordA["lastname"] into field "fld_lastname"
put tRecordA["position"] into field "fld_position"
put tRecordA["telephone"] into field "fld_telephone"
put tRecordA["mobile"] into field "fld_mobile"
put tRecordA["email"] into field "fld_email"
end AB