sma2006 Outstanding Contributor.
Outstanding Contributor.
240 views

Getting multivalue from 2 fields in one edir attribute


Hello,

I've found the way to get multivalue from field "roomsA" (CreateUser
form) and setup an edir attribute in the "create entity" activity in my
provisioning workflow (IDM 4.5.1).

I put this script in the attribute "replace value" in the "create
entity" properties and it works fine.

function list() {
v=new java.util.Vector();
roomsA=flowdata.getObject('start/CreatUser/BatA');
for(var x=0;x<roomsA.size();x++) {
v.add(roomsA.get(x).getFirstChild().getNodeValue());
}
return v;
};
list();

But now I would like to add more values (in the same attribute) that
come from another field in my provisioning form:

roomsB=flowdata.getObject('start/CreatUser/BatB);

I'm really not a javascript expert and I don't find the way to add
values from roomsB.

Thanks for your help.

Regards

Sylvain


--
sma
------------------------------------------------------------------------
sma's Profile: https://forums.netiq.com/member.php?userid=174
View this thread: https://forums.netiq.com/showthread.php?t=54762

Labels (1)
0 Likes
3 Replies
charakopidis Absent Member.
Absent Member.

Re: Getting multivalue from 2 fields in one edir attribute


Hi,

why don't you just start a second iteration after the first for roomB
and add the values to the Vector?


Code:
--------------------

function list() {
v=new java.util.Vector();
var roomsA=flowdata.getObject('start/CreatUser/BatA');
var roomsB=flowdata.getObject('start/CreatUser/BatB);
for(var x=0;x<roomsA.size();x++) {
v.add(roomsA.get(x).getFirstChild().getNodeValue() );
}
for(var x=0;x<roomsB.size();x++) {
v.add(roomsB.get(x).getFirstChild().getNodeValue() );
}
return v;
};
list();

--------------------


Regards

Zisis


--
charakopidis
------------------------------------------------------------------------
charakopidis's Profile: https://forums.netiq.com/member.php?userid=829
View this thread: https://forums.netiq.com/showthread.php?t=54762

0 Likes
sma2006 Outstanding Contributor.
Outstanding Contributor.

Re: Getting multivalue from 2 fields in one edir attribute


I will try that.

Thx a lot.

Regards

Sylvain


--
sma
------------------------------------------------------------------------
sma's Profile: https://forums.netiq.com/member.php?userid=174
View this thread: https://forums.netiq.com/showthread.php?t=54762

0 Likes
sma2006 Outstanding Contributor.
Outstanding Contributor.

Re: Getting multivalue from 2 fields in one edir attribute


Great, it works fine.
The multivalue attribute is populated with roomA and roomB values.
Thanks again.
Sylvain


--
sma
------------------------------------------------------------------------
sma's Profile: https://forums.netiq.com/member.php?userid=174
View this thread: https://forums.netiq.com/showthread.php?t=54762

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.