Code: Select all
dispatch "deleteline" to group "recordsGrid" with whichRecLine
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Code: Select all
dispatch "deleteline" to group "recordsGrid" with whichRecLine
Code: Select all
dispatch "deleteLine" to the dgControl of the target with whichRecLine
Code: Select all
local allRecords
on openCard
fillRecordsGrid
end openCard
on fillRecordsGrid
put getTheRecords() into allRecords
set the itemDelimiter to tab
put 0 into counter
repeat for each line thisLine in allRecords
add 1 to counter
put item 1 of thisLine into recordArray[counter]["profile"]
put item 2 of thisLine into recordArray[counter]["date"]
put item 3 of thisLine into recordArray[counter]["time"]
put item 5 of thisLine into recordArray[counter]["facets"]
end repeat
set the dgData of group "recordsGrid" to recordArray
end fillRecordsGrid
on deleteRecord theDGLine
put line theDGLine of allRecords into theRecord
put "Are you sure you want to delete the quiz results for @nickname from @date at @time?" into theQuestion
put item 1 of theRecord into nickname
set the itemDel to ","
put item 1 of nickname into nickname
replace "@nickname" with nickname in theQuestion
set the itemDel to tab
replace "@date" with item 2 of theRecord in theQuestion
replace "@time" with item 3 of theRecord in theQuestion
answer theQuestion with "DELETE" or "CANCEL"
if it is "CANCEL" then exit deleteRecord
delete line theDGLine of allRecords
saveRecords allRecords
dispatch "deleteline" to group "recordsGrid" with theDGLine
end deleteRecord
on viewReport theDGLine
put line theDGLine of allRecords into theRecord
set the itemDel to tab
put item 1 of theRecord into fld "profile" of card "results"
put item 4 of theRecord into fld "facetArray" of card "results"
goCard "results"
dispatch "createReport" to card "results"
end viewReport