Issues creating approval sequence using javascript to determine approver(s)

Hi Experts!

I'm trying to configure an approval sequence which looks at user selections made on a catalog item and then references a database table to determine the selected user/group's manager (appropriate approver).

Catalog Item Field | Requirement
oceaniaGroup | Requires approval from group manager (working)
user1 | Requires approval from manager (working)
user2-5 | Requires approval from manager (not working)

I had initially tried to set this approval sequence up under a singular approval definition however this appears to set the approvers as the actual approval role names rather than use the javascript approval, essentially routing the approvals to limbo.

As the above didn't work, I have instead setup multiple approval definitions - one for each approval required.
This works if i have the oceaniaGroup and user1 approvals set under Request Level Approvals, but doesn't work if i add the user2 approval, which causes me to get a web service error when trying to log the request.

What i'm absolutely stuck on is this user2 approval. Even if I change the user1 approval to look at the user2 field rather than the user1 field from the request, the approval sequence appears to break and doesn't actually assign any approver despite these fields being nearly indentical (see below).

var requestedUser = svcOps.substring(svcOps.indexOf('id="user1">') 11);
var revisedUser = requestedUser.substring(requestedUser.substring(0),requestedUser.indexOf('</text>'));

// DOESNT WORK var requestedUser = svcOps.substring(svcOps.indexOf('id="user2">') 11); var revisedUser = requestedUser.substring(requestedUser.substring(0),requestedUser.indexOf('</text>'));

I've attached a screenshot of the user1 approval script and below are the XML tags which contain user1/user2 data.

<text visible="[memberSelect1]=&quot;addUser&quot;" mandatory="[memberSelect1]=&quot;addUser&quot;" readonly="false" multiline="false" button="4002" label="Username" id="user1">OCEANIA\SullivanB</text>
<text visible="[memberSelect1]=&quot;addUser&quot;" mandatory="false" readonly="false" multiline="false" button="4004" label="Username" id="user2">OCEANIA\CurryM</text>

Does anyone have any ideas on what i'm doing wrong here?

Thanks in advance for any help!

EDIT:   User2 approval works if i manually define an approver using the below function however does not seem to work as per the attached approval.

vars.$L_approval_role_user = "oceania-sullivanb";