Hi Guys,I need some help again please.
I'v got the following code below which seems to be working in getting the information. The line where I put tTheData["customer"] into field "customer_name" seems to be failing. Its not putting anything into the field. If I change that line to put tTheData into field "customer_name" - then it puts the entire retrieved data into that field which is what Im expecting.
I'd like to just put the returned data into the correct fields, so customer should go in the customer_name field, customerID should go into the customer_id field etc.
Many thanks as always
Jalz
command CustomerForm pCustomerID
local tTheSQLQuery, tTheData
if (gConnID > 0) then
put "SELECT customerID,customer,address1 FROM customer WHERE customerID=" && pCustomerID into tTheSQLQuery
put revDataFromQuery(tab, cr, gConnID, tTheSQLQuery) into tTheData
if tTheData begins with "revdberr," then
delete item 1 of tTheData
else
answer tTheData
put tTheData["customer"] into field "customer_name"
end if
end if
end CustomerForm
Trying to get the data into the right fields
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Trying to get the data into the right fields
This should do it...
Code: Select all
set ItemDel to tab
put item 1 of tTheData into fld "customer_ID"
put item 2 of tTheData into fld "customer_name"
Re: Trying to get the data into the right fields
Thank you! Yes that does it, its another way of doing it that I would never of used or guessed