Hi,

working on a workflow we have three diffrent types of roles that can be
added.
my thought was to add all of them to an array and loop through it to
add all the roles.

this is the code to create the add-array:
var user=form.getAllValues("loginname")[0][0];

if (user !='')
{
var addrole = new Array();
addrole[0]=form.getValues("department");
addrole[1]=form.getValues("employeetype");

var selectedroles=form.getValues("roles");

for(i=0;i<selectedroles.length;i++){
addrole[i+2]=selectedroles[i];
}
field.setValues(addrole);
field.select(addrole);
var add2=form.getValues("addroles");
form.alert("after select: " +add2[0]);
form.alert("lengtht: " +add2.length);


}

in a mapping rule I then have this code:
function roles()
{
var role = flowdata.get('start/request_form/addroles');
return role[flowdata.get('rolenr')];
}
roles();

I have some counters as well to make it work, that part works.
the problem is the add part in the role request.

I have this in the "Roles" line:
flowdata.get('roledn')

the error I get is that Role DN [c] is invalid.
I suspect I get a string instead of an array somehow and that explains
me gettin a c instead of cn=.......
But how do I make it work?

The fist code part is in a dn picklist field and the post mapping is
set and shows it being a dn.

Thanks


--
-----------------------------------
joakim . ganse_@_ accept-it . se
------------------------------------------------------------------------
joakim_ganse's Profile: http://forums.novell.com/member.php?userid=6236
View this thread: http://forums.novell.com/showthread.php?t=452118