function(currentRecord)
{
function fieldChanged(context)
{
var theRecord = context.currentRecord;
var val = context.getValue('location');
if(val == 'location1')
{
context.setValue('location2');
}
}
return{ fieldChanged : fieldChanged;};
}