Hi,
I have just been introduced to Virtual Attributes in Access manager. As a first attempt, I am using a fairly complex Java script (see below) with 7 parameters to derive a virtual attribute. Normally I would have done a schema extension and written an IDM loopback driver to set the attribute. The virtual attribute is more convenient but I was wondering if there are any log in overheads associated with it.

The JavaScript (FYI):

[I]function main (P1,P2,P3,P4,P5,P6,P7){
// Enrolled PGR students are in Figshare group xxxPGR where xxx is the faculty code.
// Faculty staff are by default have an affiliation with the faculty group on Figshare
// Faculty academic staff in research schools are affiliated with the associated Figshare group for the school (see arrays "schools" and "school_groups")
// If none of the above apply then there is no figshare affiliation
// Schools are determined by the first 4 chars of the department number e.g. TYEM.
var figaff = "";
var school = P5.substring(0,4);
var faculty = P5.substring(0,2);
var is_acad = 0;

// Staff
if(P1 == "staff" || P1 == "sumo" ) {
// Check Figshare administrators (these are in a special group)
if (P7 instanceof Array) {
for(i=0;i<P7.length;i++) {
if(P7[i] == "cn=FigshareAdmins,ou=Groups,o=dmu" ) {
figaff = "DMU";
break;
}
}
} else if (P7 == "cn=FigshareAdmins,ou=Groups,o=dmu" ) {
figaff = "DMU";
}
// Not administrators
if(figaff == "") {
switch(faculty) {
case "TY": figaff="FOT"; break;
case "BL": figaff="BAL"; break;
case "AH": figaff="ADH"; break;
case "HL": figaff="HLS"; break;
}

// Are they academic?
switch(P2) {
case "ACAD": is_acad=1; break;
case "RES": is_acad=1; break;
case "PROF": is_acad=1; break;
case "PTLE": is_acad=1; break;
case "RDR": is_acad=1; break;
default: is_acad=0; break;
}

// If they are academic, are they in a research school?
if(is_acad==1) {
switch(school) {
case "TYCS": figaff= "FOTCSI"; break;
case "TYEM": figaff= "FOTESD"; break;
case "BLLC": figaff= "BALCBS"; break;
case "BLLW": figaff= "BALLAW"; break;
case "AHAR": figaff= "ADHARC"; break;
case "AHAS": figaff= "ADHVPA"; break;
case "AHDN": figaff= "ADHDES"; break;
case "AHHS": figaff= "ADHHUM"; break;
case "BLPP": figaff= "BALPPP"; break;
case "HLAH": figaff= "HLSAHS"; break;
case "HLAS": figaff= "HSLASS"; break;
case "HLNM": figaff= "HLSNAM"; break;
case "HLPY": figaff= "HLSPHA"; break;
}
}
}
} else if (P1 == "student" ) {
if(P6 == "PGR" || P6 == "GR" ) {
if (P3 instanceof Array) {
for(i=0;i<P3.length;i++) {
if(P3[i] == "Enrolled" ) {
figaff = P4 + "PGR";
break;
}
}
} else if (P3 == "Enrolled") {
figaff = P4 + "PGR";
}
}
}
return figaff;
}[/
I]

Any advice would be welcome.
Steve