Define a function that accepts the 'field' parameter and return the 'styler' function.
function mystyler(field){
return function(value){
if (value=='RP-SN-01'){
console.log(field)
return 'color:blue'
}
}
}
And then apply it to the column.
<th data-options="field:'productid',width:100,
styler: mystyler('productid')
">Product</th>