In a data grid, from the "Finques" card, I have a script that selects the data from a row and passes it to another data grid, from the "Pisos" card, and I also want to execute a script, "Pisos" card, which fills the individual fields.
Everything works perfectly until you get to the script that you have to fill in the individual fields that gives me error. It could be because the initial script tries to execute the script of another card. I attach the two scripts and the error
Code: Select all
on mouseUp
-- CARD FINQUES
local tLine, tID
put the dgHilitedLines of group "Pisos" into tLine
put the dgDataOfLine[tLine] of group "Pisos" into tDataLine
put tDataLine["COL 1"] into tID
put "SELECT p.pisID, f.finca ||' '|| p.pis, p.lloguer FROM Pisos p, Finques f WHERE p.FincaID = f.fincaID AND p.PisID = '" & tID & "'" into tQuery
put textDecode(revDataFromQuery(tab, cr, gDatabaseID, tQuery),"UTF-8") into tData
-- CARD PISOS
go card "Pisos"
set the dgText of group "dgPisos" to tData
-- ERROR
showRecordPisos2
end mouseUp
Code: Select all
on showRecordPisos2
tFields
put the dgDataOfLine[1] of group "dgPisos" into tFields
put tFields["Col 1"] into field "ID"
put tFields["Col 3"] into field "Lloguer"
put displayFormat(field "Lloguer") into field "Lloguer"
put "SELECT p.Referencia, p.Pis, p.Rebut, f.Finca, p.FincaID FROM Pisos p, Finques f WHERE pisID='" & field "ID" & "'" & " AND p.fincaID = f.fincaID" into tQuery
put textDecode(revDataFromQuery(tab, cr, gDatabaseID, tQuery),"UTF-8") into tData
set the itemDelimiter to tab
put item 1 of tData into field "Referencia"
put item 2 of tData into field "Pis"
if item 3 of tData = 1 then
set the hilite btn "btnRebut" to true
else
set the hilite btn "btnRebut" to false
end if
put item 4 of tData into field "Finca"
set text of field "lblSelect" to field "finca" && field "pis"
showLloguers
-- showTotalsPisos
end showRecordPisos2
Another thing. I think it's called hard return, which allows you to separate a very long line in several lines "\". Some idea to do it with the keyboard of a MacBook.
I hope to have explained myself well, Thanks in advance
Carles