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!
on mouseUp
put databaseGetContactDetails() into field "contact details"
put databaseGetContactDetails() into "Data Grid 1"
end mouseUp
function databaseGetContactDetails
## Query the database for contact details to be displayed in the field
put getDatabaseID() into tDatabaseID
put "SELECT * from contact_details" into tSQL
put revDataFromQuery(tab,return,tDatabaseID,tSQL) into tRecords
return tRecords
end databaseGetContactDetails
But it does work in the data grid. What am I doing wrong here
on mouseUp
put databaseGetContactDetails() into field "contact details"
# Wrong syntax!
###put databaseGetContactDetails() into "Data Grid 1"
## A Datagrid is a group and you need to set its DGTEXT property!
set the dgtext of grp "Data Grid 1" to databaseGetContactDetails()
end mouseUp