loading the known pk

I have a pk in a variable. Is there a function which will enable me to directly load that record? Unless I’m doing something wrong, controller.loadRecords(variable) isn’t working for me.

To get around the issue I’m first loading the variable into a global integer field. Then running controller.loadRecords(relation) where “relation” is a relationship between the global and the pk field. This works, but feels cumbersome.

Morley,

controller.loadRecords() only works with an ARRAY.

Try this:

var x = new Array(value)
controller.loadRecords(x)