Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>EDIT: Your code is really messy, but I think that I know what you are asking for:</p> <pre><code> List links = user.getLinks(); if (links != null) { Iterator lit = links.iterator(); while (lit.hasNext()) { Link l = lit.next(); String lname = l.getApplicationName(); if (lname.equalsIgnoreCase(appname)) { userid = (String) l.getAttribute("User Name"); List organizations = l.getAttribute("Organization"); StringBuilder sb = new StringBuilder(); String listItemsSeparator = " "; // this you can change to anything you want, it separates items from list //iterating over list, to convert it to single String for (Object organization : organizations) { sb.append(organization.toString()); sb.append(listItemsSeparator); } orgList = sb.toString().trim(); } } } </code></pre> <p>edit2:</p> <pre><code>while (it.hasNext()) { //Get link and create object Object [] record = it.next(); String identityName = (String) record[0]; Identity user = (Identity) context.getObject(Identity.class, identityName); //Get Identity attributes for export String workforceid = (String) user.getAttribute("workforceID"); //Get application attributes for export String userid=""; List links = user.getLinks(); if (links!=null) { Iterator lit = links.iterator(); while (lit.hasNext()) { Link l = lit.next(); String lname = l.getApplicationName(); if (lname.equalsIgnoreCase(appname)) { userid = (String) l.getAttribute("User Name"); List orgList = l.getAttribute("Organization"); if(organization &amp;lt; orgList.size()) { String singleOrganization = orgList.get(organization); organization++; //Output file out.write(identityName+","+userid+","+workforceid+","+orgList); out.newLine(); out.flush(); } } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload