Support Home Scripting Use Cases Spreadsheet Randomisation

Spreadsheet Randomisation

In Gorilla, the order in which displays in the tasks and scenes in the games are shown is specified in the spreadsheet, where each row represents a time step in the task/game.

Spreadsheet Randomisation is used when you want to randomise the order in which participants see the parts of your tasks/games.

There are many built-in randomisation options which allow you to dynamically change the order of the trials - you can review them in our Spreadsheet Randomisation Guide. However, you might wish to create a new randomisation method for your tasks/games and you can do so by creating your own spreadsheet randomisation component.


Start by creating a new component with the Spreadsheet Randomisation Component template:

Image showing a new script panel with the Spreadsheet Randomisation Component template selected and the name MySpreadsheetRandomisation in the name box

You can now implement your logic in the randomiseSpreadsheet() lifecycle method:

// in your component body public randomiseSpreadsheet(name: string, columns: string[], rows: any[]) { // add your randomisation logic here return rows; }

Scripting Sample

For a worked example of a new spreadsheet randomisation component see our Custom Spreadsheet Randomisation Example.