All of the cells for a column are stored in the "cells" array of that column. The best way to delete them is to match the cells you want with some if statement, then just use the Ruby Array argument "delete" to delete them.
For example, say I had a column called "trial" that had an argument called "hand", that could be "l" or "r" (meaning left or right hand). For some reason, I want to delete all of the cells that were coded as a left hand.
# First get the column from the database trial = getVariable("trial") # Now loop through all of the cells in that column, checking if # they are coded as a left hand. for cell in trial.cells # Is hand coded as "l" for this cell? if cell.hand == "l" # If yes, then delete it from the cell array. trial.cells.delete(cell) end end
answered 26 Jan '12, 09:07
there's now a deleteCell() function:
answered 30 Mar, 10:52