Anonymous_User Absent Member.
Absent Member.
240 views

show existing Roles on DN set

When the user goes back to a workflow I want to display (non editable,
just for their refereence) to the user the roles that they currently
have when the DNlookup is complete. I would think an onchange event. I
was thinking a control type of textarea. Any guidance? Arraylist don't
seem to be usable from a form item.



In a mapping object in workflow I use the following to get the roles the
user is already assigned. For this workflow the roles names start with
SSP. All good.

function fplsroleremoval() {
var allroles = new Packages.java.util.ArrayList();
var fplsroles = new Packages.java.util.ArrayList();
allroles = RoleVault.getRolesUserIn(flowdata.get
('start/request_form/recipient_DN'));
var prefix = "SSP";
var cnt = allroles.size();
for(i=0;i<allroles.size(); i++){
var parseArray = new Packages.java.util.ArrayList();
if(allroles.get(i).substring(3,6) == prefix){
fplsroles.add(allroles.get(i));
}
}
return fplsroles;
}
fplsroleremoval();



Labels (1)
0 Likes
2 Replies
Anonymous_User Absent Member.
Absent Member.

Re: show existing Roles on DN set

chad,

It appears that in the past few days you have not received a response to your
posting. That concerns us, and has triggered this automated reply.

Has your issue been resolved? If not, you might try one of the following options:

- Visit http://www.netiq.com/support and search the knowledgebase and/or check all
the other support options available.
- You could also try posting your message again. Make sure it is posted in the
correct newsgroup. (http://forums.netiq.com)

Be sure to read the forum FAQ about what to expect in the way of responses:
http://forums.netiq.com/faq.php

If this is a reply to a duplicate posting, please ignore and accept our apologies
and rest assured we will issue a stern reprimand to our posting bot.

Good luck!

Your NetIQ Forums Team
http://forums.netiq.com


0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: show existing Roles on DN set


ncisrael;222795 Wrote:
> When the user goes back to a workflow I want to display (non editable,
> just for their refereence) to the user the roles that they currently
> have when the DNlookup is complete. I would think an onchange event. I
> was thinking a control type of textarea. Any guidance? Arraylist
> don't
> seem to be usable from a form item.
>
>
>
> In a mapping object in workflow I use the following to get the roles
> the
> user is already assigned. For this workflow the roles names start with
> SSP. All good.
>
> function fplsroleremoval() {
> var allroles = new Packages.java.util.ArrayList();
> var fplsroles = new Packages.java.util.ArrayList();
> allroles = RoleVault.getRolesUserIn(flowdata.get
> ('start/request_form/recipient_DN'));
> var prefix = "SSP";
> var cnt = allroles.size();
> for(i=0;i<allroles.size(); i++){
> var parseArray = new Packages.java.util.ArrayList();
> if(allroles.get(i).substring(3,6) == prefix){
> fplsroles.add(allroles.get(i));
> }
> }
> return fplsroles;
> }
> fplsroleremoval();




You can as you said use a textarea Control Type:

You can concatenate your DN’s into a string separated by carriage return
to make a List:

dnText = dnText + allroles.get(i) + “\n”

form.setValues(“roleTextArea”, dnText)


Or

Use a Control Type CheckBoxPickList

You can concatenate your DN’s or CN’s into a string separated by
semicolon:

dnText = dnText + allroles.get(i) + “;”


To display in a sorted checkboxpicklist:

form.setValues("roleCheckBoxPickList", dnText.split(";").sort())


You could also show all roles and do a “select” on the roles they belong
to show them “checked”…

Hope that helps.

Gary


--
gholdefe
------------------------------------------------------------------------
gholdefe's Profile: https://forums.netiq.com/member.php?userid=318
View this thread: https://forums.netiq.com/showthread.php?t=46290

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.