I've managed to resolve it. I used the following javascript code:
checkL2Approver : function() {
if (_.serviceoption.status() == 507) {
document.querySelector("select").focus();
var num = document.activeElement.id;
var e = document.getElementById(num);
var strUser = e.options[e.selectedIndex].text;
var currentValue = ca_fdGetTextFieldValue('form1','l2managerfull');
if (currentValue == "" && strUser == 'Approved') {
alert('Please select an approver');
return false; }
}
return true;
},
On my form at the approval stages the 1st 'select' element is always the one I'm looking for. I set the focus to it and extract the id which is generated dynamically with an incrementing number.