How to get DocSet property values in a SharePoint library into a CSV file using Powershell

Hi,
How to get DocSet property values in a SharePoint library into a CSV file using Powershell?
Any help would be greatly appreciated.
Thank you.
AA.

Hi AOK,
Would you please post your current script and the issue for more effcient support.
In addition, to manage document set in sharepoint please refer to this script to start:
### Load SharePoint SnapIn
2.if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null)
3.{
4. Add-PSSnapin Microsoft.SharePoint.PowerShell
5.}
6.### Load SharePoint Object Model
7.[System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.SharePoint”)
8.
9.### Get web and list
10.$web = Get-SPWeb http://myweb
11.$list = $web.Lists["List with Document Sets"]
12.
13.### Get Document Set Content Type from list
14.$cType = $list.ContentTypes["Document Set Content Type Name"]
15.
16.### Create Document Set Properties Hashtable
17.[Hashtable]$docsetProperties = @{"DocumentSetDescription"="A Document Set"}
18.$docsetProperties = @{"CustomColumn1"="Value 1"}
19.$docsetProperties = @{"CustomColum2"="Value2"}
20. ### Add all your Columns for your Document Set
21.
22.### Create new Document Set
23.$newDocumentSet = [Microsoft.Office.DocumentManagement.DocumentSets.DocumentSet]::Create($list.RootFolder,"Document Set Title",$cType.Id,$docsetProperties)
24.$web.Dispose()
http://www.letssharepoint.com/2011/06/document-sets-und-powershell.html
If there is anything else regarding this issue, please feel free to post back.
Best Regards,
Anna Wang
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

Similar Messages

  • How to get Document Set property values in a SharePoint library in to a CSV file using Powershell

    Hi,
    How to get Document Set property values in a SharePoint library into a CSV file using Powershell?
    Any help would be greatly appreciated.
    Thank you.
    AA.

    Hi,
    According to your description, my understanding is that you want to you want to get document set property value in a SharePoint library and then export into a CSV file using PowerShell.
    I suggest you can get the document sets properties like the PowerShell Command below:
    [system.reflection.assembly]::loadwithpartialname("microsoft.sharepoint")
    $siteurl="http://sp2013sps/sites/test"
    $listname="Documents"
    $mysite=new-object microsoft.sharepoint.spsite($siteurl)
    $myweb=$mysite.openweb()
    $list=$myweb.lists[$listname]
    foreach($item in $list.items)
    if($item.contenttype.name -eq "Document Set")
    if($item.folder.itemcount -eq 0)
    write-host $item.title
    Then you can use Export-Csv PowerShell Command to export to a CSV file.
    More information:
    Powershell for document sets
    How to export data to CSV in PowerShell?
    Using the Export-Csv Cmdlet
    Thanks
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How can I export multiple selections in a list box into a .csv file?

    Hi all, I've created a form in Acrobat X with a list box enabled for multiple selections. When I try to export the filled out form into a .csv file, only the first selection shows up. Can anyone help me figure out how to get all selections to export? Thanks!

    Thank you for your quick response!
    Once a recipient fills out the form (which has two questions with list boxes and multiple selection enabled) they send the completed form back to me. When I open the completed form, I am given the option add the completed form to a reponse file which was set up when I distributed the form. When I open the reponse file, it lists all of the responses in rows, and the values that were chosen in the form are arranged in columns. In this file, the list boxe columns have multiple values, separated by commas (which is what I'm looking for). At this point there is an option to export into a .csv file or an .xml file. If I choose the .csv file and open in excel, only the first selection shows in the list box column rather than all selections that were initially made by the responder.

  • How do I get a property value from my PreUUTLoop callback into my MainSequence?

    I am trying to get a propety value (it's a VISA session number) from my PreUUTLoop callback into my MainSequence so that I can then contol my piece og GPIB equipment. How do I do that? Do I use a parameter or local variable, or something else? What mechanism do I use to pass it?
    Thanks

    Hi,
    You will need to write it to a variable in the FileGlobals, that way it will be accessible to both sequences.
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • How to remove HTML encoding from csv file using powershell

    Hi guys i am exporting data from a sharepoint list using powershell which works fine. My problem is that some of the fields contain HTML mark up. Is there a way to remove all of the html mark up from the array before writing it to csv ?
    I have tried playing about with System.Web.HttpUtility.HtmlDecode but with no luck the code runs but no html is removed.
    Below is a sample of my script.
    Set-Variable HOME $env:USERPROFILE -Force
    (Get-PSProvider FileSystem).Home = $HOME
    if(-not(Get-PSSnapin | where { $_.Name -eq "Microsoft.SharePoint.PowerShell"}))
    Add-PSSnapin Microsoft.SharePoint.PowerShell;
    # imports assembly needed for url stuff to do
    Add-Type -AssemblyName System.Web
    $SPWeb = Get-SPWeb "http://site url"
    $SPList = $SPWeb.Lists["List Name"]
    $exportlist = @()
    $SPList.Items | foreach {
    $obj = New-Object PSObject -Property @{
    "Employee full name" = $_["EMPLOYEEFNAME"]
    "Employee login name" = $_["EMPLOYEENAME"]
    "Department Name" = $_["DEPARTMENT"]
    System.Web.HttpUtility.HtmlDecode("OBJECTIVESTOBEACHIEVED_0") = $_["F1_S4a_OBJECTIVESTOBEACHIEVED_0"]
    "OBJECTIVESTOBEACHIEVED_1" = $_["F1_S4a_OBJECTIVESTOBEACHIEVED_1"]
    "OBJECTIVESTOBEACHIEVED_2" = $_["F1_S4a_OBJECTIVESTOBEACHIEVED_2"]
    "OBJECTIVESTOBEACHIEVED_3" = $_["F1_S4a_OBJECTIVESTOBEACHIEVED_3"]
    "OBJECTIVESTOBEACHIEVED_4" = $_["F1_S4a_OBJECTIVESTOBEACHIEVED_4"]
    "OBJECTIVESTOBEACHIEVED_5" = $_["F1_S4a_OBJECTIVESTOBEACHIEVED_5"]
    "OBJECTIVESTOBEACHIEVED_6" = $_["F1_S4a_OBJECTIVESTOBEACHIEVED_6"]
    "OBJECTIVESTOBEACHIEVED_7" = $_["F1_S4a_OBJECTIVESTOBEACHIEVED_7"]
    $exportlist += $obj
    $exportlist | select "Employee full name", "Employee login name", "Department Name", "OBJECTIVESTOBEACHIEVED_0", "OBJECTIVESTOBEACHIEVED_1", "OBJECTIVESTOBEACHIEVED_2", "OBJECTIVESTOBEACHIEVED_3", "OBJECTIVESTOBEACHIEVED_4", "OBJECTIVESTOBEACHIEVED_5", "OBJECTIVESTOBEACHIEVED_6", "OBJECTIVESTOBEACHIEVED_7" | Export-Csv ~/Export.csv -noType
    $SPWeb.Dispose()
    any help would be much appreciated.

    Should have googled before posting !
    "OBJECTIVESTOBEACHIEVED_0" = [Microsoft.SharePoint.Utilities.SPHttpUtility]::ConvertSimpleHtmlToText($_["F1_S4a_OBJECTIVESTOBEACHIEVED_0"],-1) -replace '\s+', ' '
    Clears all the additional white space. As always jrv you
    have saved the day, many thanks for all the help.
    Mal

  • How to Compare 2 CSV file and store the result to 3rd csv file using PowerShell script?

    I want to do the below task using powershell script only.
    I have 2 csv files and I want to compare those two files and I want to store the comparision result to 3rd csv file. Please look at the follwingsnap:
    This image is csv file only. 
    Could you please any one help me.
    Thanks in advance.
    By
    A Path finder 
    JoSwa
    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful"
    Best Online Journal

    Not certain this is what you're after, but this :
    #import the contents of both csv files
    $dbexcel=import-csv c:\dbexcel.csv
    $liveexcel=import-csv C:\liveexcel.csv
    #prepare the output csv and create the headers
    $outputexcel="c:\outputexcel.csv"
    $outputline="Name,Connection Status,Version,DbExcel,LiveExcel"
    $outputline | out-file $outputexcel
    #Loop through each record based on the number of records (assuming equal number in both files)
    for ($i=0; $i -le $dbexcel.Length-1;$i++)
    # Assign the yes / null values to equal the word equivalent
    if ($dbexcel.isavail[$i] -eq "yes") {$dbavail="Available"} else {$dbavail="Unavailable"}
    if ($liveexcel.isavail[$i] -eq "yes") {$liveavail="Available"} else {$liveavail="Unavailable"}
    #create the live of csv content from the two input csv files
    $outputline=$dbexcel.name[$i] + "," + $liveexcel.'connection status'[$i] + "," + $dbexcel.version[$i] + "," + $dbavail + "," + $liveavail
    #output that line to the csv file
    $outputline | out-file $outputexcel -Append
    should do what you're looking for, or give you enough to edit it to your exact need.
    I've assumed that the dbexcel.csv and liveexcel.csv files live in the root of c:\ for this, that they include the header information, and that the outputexcel.csv file will be saved to the same place (including headers).

  • How do you write any kind of content you want into a new file using Java?

    I know this is extremely basic, but I have absolutely no idea how to do this!
    How can I create a brand new file on my machine, this new file containing literally ANYTHING I want: String content; Image content, Excel content, Whatever content.. literally anything on the planet I can come up with..??
    I have tried everything I can think of to no avail and have exhausted every online tutorial I could find both here and via Google, to no avail. I can't figure it out, and this is all I have so far:
    * FileDownloader.java
    * Created on January 10, 2007, 3:47 PM
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package FileTools;
    import java.io.*;
    import java.net.*;
    * @author ppowell-c
    public class FileDownloader {
        public static void download(URL url, File file) throws IOException {
            InputStream in = url.openStream();
            FileOutputStream out = new FileOutputStream(file);
            byte[] b = new byte[1024];
            int len;
            while((len = in.read(b)) != -1) {
                out.write(b, 0, len);
            out.close();
        public static void download(String path, File file) throws IOException {
         download(new URL(path), file);
        public static void download(String path, Object contents) throws IOException {
         ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(path));
         out.writeObject(contents);
         out.close();
    }This code fails to download contents into a new file in the case whereby I want to create a new .ico Icon file with the contents from ImageIcon.getImage() as an example, which is what I want to do right now.
    Thanx
    Phil

    beyond any mortal being? In PHP it's extremely easy,
    it's just three lines:
    <?
    $fileID = @fopen('/path/to/your/file', 'rb');
    @fputs($fileID, $contents);  // $contents can be
    literally anything, even anobject!
    @fclose($fileID);
    The thing here is - what is in $contents? I personally don't have a clue how to manually create the contents for a .bmp file for instance - I don't know what should go where in order for a .bmp reader to be able to recognize the file as a "real" bitmap (.bmp) file. I can, however, just put anything I want - anything at all into a file, write it out, calling it a .bmp file. Will it be a .bmp file? No, of course not. So, what is in $contents?
    ~Bill

  • How do I split a Large CSV file into Multiple CSV's Using Powershell

    I am a novice at powershell but this looks to be the best tool to do this task. have a csv file that looks like this:
    Date,Policy,Application
    10/13/2014,No,None
    10/13/2014,No,None
    10/13/2014,No,None
    10/13/2014,No,None
    10/13/2014,No,None
    11/14/2013,Yes,AppBiz
    11/14/2013,Yes,AppBiz
    11/14/2013,Yes,AppBiz
    07/04/2013,No,PeopleBiz
    07/04/2013,No,PeopleBiz
    07/04/2013,No,PeopleBiz
    07/04/2013,No,PeopleBiz
    Is it possible to split this CSV into multiple CSV's based on "Application".
    Lets say the output might look like:
    None.csv
    10/13/2014,No,None
    10/13/2014,No,None
    10/13/2014,No,None
    10/13/2014,No,None
    10/13/2014,No,None
    AppBiz.csv
    11/14/2013,Yes,AppBiz
    11/14/2013,Yes,AppBiz
    11/14/2013,Yes,AppBiz
    PeopleBiz.csv
    07/04/2013,No,PeopleBiz
    07/04/2013,No,PeopleBiz
    07/04/2013,No,PeopleBiz
    07/04/2013,No,PeopleBiz
    Any help would be greatly appreciated

    I think this might be what you want:
    Import-Csv applications.csv |
    Group Application |
    foreach {
    $_.Group | Export-Csv "$($_.Name).csv" -NoTypeInformation
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
    Very nice! 4x faster..
    I doubt the OP will get what you just did there..
    Sam Boutros, Senior Consultant, Software Logic, KOP, PA http://superwidgets.wordpress.com (Please take a moment to Vote as Helpful and/or Mark as Answer, where applicable) _________________________________________________________________________________
    Powershell: Learn it before it's an emergency http://technet.microsoft.com/en-us/scriptcenter/powershell.aspx http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx

  • How to get MOSI API values (like Customer GUID, Subscription GUID etc.,) from Office 365 PowerShell

    Hi MOSI Team,
    I need Customer GUID, Subscription GUID which were created by OrderManagement API (CreateCustomerAccount, PlaceOrder) with Office 365 PowerShell (either Exchange or MSOL) script.
    Is it possible?
    Thank you in advance.
    Regards,
    Sashi

    Reading that, it has not improved and its May 2014.
    Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.

  • How to get a kerning value in JavaScript

    How to get a kerning value(distance between two characters) using javascript?

    @Raykor11:
    It would be best to move that question to scripting forum for InDesign.
    But one solution could be:
    1. Read out the property kerningValue from the insertion point between the two characters:
    //if two characters are selected:
    var _kerningValue = app.selection[0].insertionPoints[1].kerningValue;
    2. Measure the exact distance between the characters, so you can decide if you want to increase or decrease the distance
    //Two characters are selected:
    var _twoCharacters = app.selection[0];
    var _charLeft = _twoCharacters.characters[0];
    var _charRight = _twoCharacters.characters[1];
    var _temp1 = _charLeft.createOutlines(false) //false = does NOT delete original
    var _bounds1 = _temp1[0].visibleBounds;
    var _temp2 = _charRight.createOutlines(false) //false = does NOT delete original
    var _bounds2 = _temp2[0].visibleBounds;
    var _distance = _bounds2[1]-_bounds1[3];
    _temp1[0].remove();
    _temp2[0].remove();
    alert("Distance between: "+_distance);
    Be aware that there are a lot of other factors that will apply to character distance if you change the kerning value (like tracking, kerning method, composer, desiredGlyphScaling, desiredLetterSpacing, horizontalScale … just to mention a few), especially if the paragraph justification is set to JUSTIFIED or FULLY_JUSTIFIED.
    Uwe

  • How to get the kerning value and set it to back use script?

    hi,guys
    I come back again.
    I encountered a kerning problem.
    how to get the kerning value and set it to back use script?
    Thanks very much!

    For both cases, the filename can be found on the FILE.ReceivedFileName Context Property.  You can access this Property in a Pipeline Component or Orchestration and take any action you want, such as apply to a database.
    The value is accessed by: MyReceivedMessage(FILE.ReceivedFileName)
    In the case of a duplicate EDI Interchange, you would use the Failed Message Routing feature to capture the error message with either an Orchestration or Send Port.

  • JList and ListSelectionEvent : How to get the deselected Value

    Hi,
    All of you know:
    The ListSelectionEvent occurs two times:
    1.) An Enty is deselected
    2.) The new Entry is selected.
    I wanted to use the first occurence to save some data from the deselected Entry (from an Editor to a Record), and the second occurence to load the Data from the selected Entry to an Editor.
    (Until now, i use a additional lastSelectedIndex Property for that, but i dont find this very elegant.)
    Now i found that the index is allways the same. The output of the code is:
    Event 0 Index:2
    Event 1 Index:2
    Has anybody an idea how to get the deselected Value ??
    public void valueChanged(javax.swing.event.ListSelectionEvent listSelectionEvent) {
    JList list=(JList)listSelectionEvent.getSource();
    int selectedIndex = list.getSelectedIndex();
    System.out.println("Event " + count + " Index:" + selectedIndex);
    count = count+1;
    // Drop one oft them...
    if (listSelectionEvent.getValueIsAdjusting()) return;
    count=0;
    }

    Thanks, but thats not exactly what i wanted.
    I have a selectedIndex: 5
    Now i select a other item in the List, say Index: 2.
    The ListSelection-Event occurs two times:
    My understand was:
    The first occures, because an Item was deselected: index should be:5
    The second occures, because an Item was selected : index should be:2
    Is my thinking wrong?
    The code above allways gets only Index 2.
    How can i get the Index/Value 5,

  • How to get item field values for old versions?

    I need to be able to query old field values from previous versions of items in a SharePoint list. I can't execute code on the server (it needs to work with SharePoint Online/O365 for a start).
    So far the ONLY API I've that lets me do this is the lists.asmx GetVersionCollection SOAP call.
    This lets me specify a single field name and returns an XML structure with the values for the various versions, along with the modification time and who made the change - but NO reliable way of actually identifying *which* version (i.e. an ID or label). That
    is, if I know I need to fetch the Title value from version 512 ("1.0") of item 1 in list "Documents", I don't see how to reliably parse the results to determine which entry is version 512. While they may be returned in order, in many cases
    the entries are actually missing when there was no field value present (or perhaps when the field hadn't been created yet). I've tried comparing the Modified date to the Created date of the corresponding FileVersion item (which I can get via CSOM or REST),
    and while it works some of the time, it's not reliable. I've also looked at the output from the lists.asmx GetVersion API but I don't see how that's useful either, as the Created property for all versions always seems to be just the date the file was originally
    created.
    It does seem odd to me that there's not a neat way of doing this - if I need to return information for several fields but just for a single version, I have to make a whole lot of requests that return far more info than I need, and then I need to figure out
    how to parse the returned text in the case of, say, multiple-value taxonomy fields etc.
    Anyone tried doing anything similar here?
    Thanks
    Dylan

    try these links:
    https://support.office.microsoft.com/en-us/article/Track-and-view-version-information-for-SharePoint-list-items-2d69d936-fb0b-4c84-830e-11708e6ec317?CorrelationId=f87cf6ea-8cbf-446a-a4a0-e2c3a86b3425&ui=en-US&rs=en-US&ad=US
    https://social.technet.microsoft.com/Forums/en-US/e48ff216-7ed1-4b20-9f21-d496b1583eea/how-to-get-item-field-values-for-old-versions?forum=sharepointdevelopment
    http://sharepoint.stackexchange.com/questions/20019/get-meta-data-from-a-previous-version-of-a-document-through-webservice-in-moss-2
    http://sharepoint.stackexchange.com/questions/121594/getting-information-from-previous-versions-of-a-sp-list-using-csom
    Please mark answer as correct if it is correct else vote for it if you find it useful Happy SharePointing

  • How to get all the values from the dropdown menu

    How to get all the values from the dropdown menu
    I need to be able to extract all values from the dropdown menu; I know how to get all those values as a string, but I need to be able to access each item; (the value in a dropdown menu will change dynamically)
    How do I get number of item is selection dropdown?
    How do I extract a ?name? for each value, one by one?
    How do I change a selection by referring to particular index of the item in a dropdown menu?
    Here is the Path to dropdown menu that I'm trying to access (form contains number of similar dropdowns)
    RSWApp.om.GetElementByPath "window(index=0).form(id=""aspnetForm"" | action=""advancedsearch.aspx"" | index=0).formelement[SELECT](name=""ctl00$MainContent$hardwareBrand"" | id=""ctl00_MainContent_hardwareBrand"" | index=16)", element
    Message was edited by: testtest

    The findElement method allows various attributes to be used to search. Take the following two examples for the element below:
    <Select Name=ProdType ID=testProd>
    </Select>
    I can find the element based on its name or any other attribute, I just need to specify what I am looking for. To find it by name I would do the following:
    Set x = RSWApp.om.FindElement("ProdType","SELECT","Name")
    If I want to search by id I could do the following:
    Set x = RSWApp.om.FindElement("testProd","SELECT","ID")
    Usually you will use whatever is available. Since the select element has no name or ID on the Empirix home page, I used the onChange attribute. You can use any attribute as long as you specify which one you are using (last argument in these examples)
    You can use the FindElement to grab links, text boxes, etc.
    The next example grabs from a link on a page
    Home
    Set x = RSWApp.om.FindElement("Home","A","innerText")
    I hope this helps clear it up.

  • How to get the selected values from a selectmanylistbox?

    Hi ADF Experts,
    <af:selectManyListbox label="Label 1" id="sml1" partialTriggers="cb2"
                            value="#{viewScope.TestBean.lovValue}"
                      autoSubmit="true"      valuePassThru="true">
        <f:selectItems value="#{viewScope.TestBean.actualList}" id="si1"
                       binding="#{viewScope.TestBean.selectedItems}"/>
      </af:selectManyListbox>
      <af:commandButton text="get selected values" id="cb3"
                        actionListener="#{viewScope.TestBean.getSelectedValues}"
                        partialSubmit="true"/>
      private List<String> lovValue;
      private List<SelectItem> actualList;
    //getters and setters
      public void getSelectedValues(ActionEvent actionEvent) {
        // Add event code here...
        for (String selectedItem : lovValue) {
            System.out.println("Selected item: " +selectedItem.); // this is giving 1 and 3 like this. how to get the checked values as I'm getting only the indexes. In this scenario I am populating the list programmatically.Just I wanted to know how can we get the selected values(not indexes). Please suggest.
    Thanks-
    Abhijit

    Hi Timo,
    As I am sharing the page fragment and the Java class. So its my usecase I have mentioned below
    I am sharing the jsff page fragment and java class. So that it wud be of help to others.
    jsff page fragment
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
              xmlns:f="http://java.sun.com/jsf/core">
            <af:panelGroupLayout id="pgl1">
              <af:commandButton text="Search"  id="cb1"
                                actionListener="#{viewScope.TestBean.searchSupplier}"/>
    </af:panelGroupLayout>
        <af:popup id="p1" binding="#{viewScope.TestBean.searchSupplierPopup}">
              <af:dialog id="d2"
                         type="none">
               <af:table value="#{bindings.Contacts.collectionModel}" var="row"
                      rows="#{bindings.Contacts.rangeSize}"
                      emptyText="#{bindings.Contacts.viewable ? 'No data to display.' : 'Access Denied.'}"
                      fetchSize="#{bindings.Contacts.rangeSize}"
                      rowBandingInterval="0"
                      binding="#{viewScope.TestBean.tsupportIssues}"
                      filterModel="#{bindings.ContactsQuery.queryDescriptor}"
                      queryListener="#{bindings.ContactsQuery.processQuery}"
                      filterVisible="true" varStatus="vs"
                      selectionListener="#{bindings.Contacts.collectionModel.makeCurrent}"
                      rowSelection="multiple" id="t1">
              <af:column sortProperty="name" filterable="true" sortable="true"
                         headerText="#{bindings.Contacts.hints.name.label}" id="c2">
                <af:outputText value="#{row.name}" id="ot1"/>
              </af:column>
              <af:column sortProperty="email" filterable="true" sortable="true"
                         headerText="#{bindings.Contacts.hints.email.label}"
                         id="c1">
                <af:outputText value="#{row.email}" id="ot2"/>
              </af:column>
            </af:table>
          <af:commandButton text="OK" id="cb5" partialSubmit="true"       actionListener="#{viewScope.TestBean.testMethod}"/>
          <af:commandButton text="Cancel" id="cb6"
                            actionListener="#{viewScope.TestBean.cancelPopupSearch}"/>
        </af:dialog>
            </af:popup>
      <af:selectManyListbox label="Label 1" id="sml1" partialTriggers="cb5"
                            value="#{viewScope.TestBean.lovValue}"
                      autoSubmit="true"      valuePassThru="true"
                            binding="#{viewScope.TestBean.prp1}">
        <f:selectItems value="#{viewScope.TestBean.actualList}" id="si1"
                       binding="#{viewScope.TestBean.selectedItems}"/>
      </af:selectManyListbox>
      <af:commandButton text="get selected values" id="cb3"
                        actionListener="#{viewScope.TestBean.getSelectedValues}"
                        partialSubmit="true"/>
      <af:commandButton text="remove selected" id="cb4"
             partialSubmit="true"           actionListener="#{viewScope.TestBean.removeSelectedValues}"/>
    </jsp:root>
    TestBean.java
    package com.demo.view;
    import java.util.ArrayList;
    import java.util.Iterator;
    import java.util.List;
    import javax.faces.component.UISelectItems;
    import javax.faces.event.ActionEvent;
    import javax.faces.model.SelectItem;
    import oracle.adf.model.BindingContext;
    import oracle.adf.model.binding.DCBindingContainer;
    import oracle.adf.model.binding.DCIteratorBinding;
    import oracle.adf.view.rich.component.rich.RichPopup;
    import oracle.adf.view.rich.component.rich.data.RichTable;
    import oracle.adf.view.rich.component.rich.input.RichSelectManyListbox;
    import oracle.adf.view.rich.context.AdfFacesContext;
    import oracle.adf.view.rich.event.DialogEvent;
    import oracle.jbo.Key;
    import oracle.jbo.Row;
    import oracle.jbo.RowSetIterator;
    import org.apache.myfaces.trinidad.model.RowKeySet;
    public class TestBean {
      private RichTable tsupportIssues;
      private List<SelectItem> lovValue;
      private List<SelectItem> actualList;
      private RichSelectManyListbox prp1;
      private List valuesChoosed = new ArrayList();
      private UISelectItems selectedItems;
      private RichPopup searchSupplierPopup;
        public TestBean() {
        super();
      public void setTsupportIssues(RichTable tsupportIssues) {
        this.tsupportIssues = tsupportIssues;
      public RichTable getTsupportIssues() {
        return tsupportIssues;
      public void testMethod(ActionEvent actionEvent) {
        // Add event code here...
        // For learning purposes - show Select Many Button clicked 
         System.out.println("Select Many Button has been Clicked");
        // // RowKeySet Object can hold the selected rows from a user as follows    
        RowKeySet rksSelectedRows =         this.getTsupportIssues().getSelectedRowKeys();
        // Iterator object provides the ability to use hasNext(), next() and remove() against the selected rows 
        Iterator itrSelectedRows = rksSelectedRows.iterator();  
        // Get the data control that is bound to the table - e.g.
        // OpenSupportItemsIterator    
        DCBindingContainer bindings =         (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry(); 
        DCIteratorBinding dcIteratorBindings =         bindings.findIteratorBinding("findAllContactsIterator"); 
        // Information from binding that is specific to the rows  
        RowSetIterator rsiSelectedRows =         dcIteratorBindings.getRowSetIterator();   
        // Loop through selected rows  
        int i=1;
        while (itrSelectedRows.hasNext()) {        
          // Get key for selected row    
          Key key = (Key)((List)itrSelectedRows.next()).get(0);  
          // Use the key to get the data from the above binding that is related to the row      
          Row myRow = rsiSelectedRows.getRow(key);         
          // Display attribute of row in console output - would generally be bound to a UI component like a Label and or used to call another proces       
          System.out.println(myRow.getAttribute("name"));
          valuesChoosed.add(myRow.getAttribute("name"));
    //        actualList = new ArrayList<SelectItem>();
    //        String j = Integer.toString(i);
    //        actualList.add(new SelectItem(j, (String)myRow.getAttribute("name")));
    //      i++;
           searchSupplierPopup.hide();
          AdfFacesContext.getCurrentInstance().addPartialTarget(prp1);
      public void setLovValue(List<SelectItem> lovValue) {
        this.lovValue = lovValue;
      public List<SelectItem> getLovValue() {
        return lovValue;
      public void setActualList(List<SelectItem> actualList) {
        this.actualList = actualList;
      public List<SelectItem> getActualList() {
        actualList = new ArrayList<SelectItem>();
        if(valuesChoosed.size()!=0){
        for(int i=0;i<valuesChoosed.size();i++){
          actualList.add(new SelectItem(valuesChoosed.get(i), (String)valuesChoosed.get(i)));
        else{
          actualList.add(new SelectItem("1","Select One"));
        return actualList;
      public void setPrp1(RichSelectManyListbox prp1) {
        this.prp1 = prp1;
      public RichSelectManyListbox getPrp1() {
        return prp1;
      public void setValuesChoosed(List valuesChoosed) {
        this.valuesChoosed = valuesChoosed;
      public List getValuesChoosed() {
        return valuesChoosed;
      public void getValues(ActionEvent actionEvent) {
        // Add event code here...
        for(int i=0;i<valuesChoosed.size();i++){
          System.out.println(valuesChoosed.get(i));
      public void getSelectedValues(ActionEvent actionEvent) {
        // Add event code here...
         for(int i=0;i<this.getLovValue().size();i++){
             System.out.println("Selected Value:"+this.getLovValue().get(i));
      public void removeSelectedValues(ActionEvent actionEvent) {
        // Add event code here...
      public void setSelectedItems(UISelectItems selectedItems) {
        this.selectedItems = selectedItems;
      public UISelectItems getSelectedItems() {
        return selectedItems;
        public void setSearchSupplierPopup(RichPopup searchSupplierPopup) {
            this.searchSupplierPopup = searchSupplierPopup;
        public RichPopup getSearchSupplierPopup() {
            return searchSupplierPopup;
        public void cancelPopupSearch(ActionEvent actionEvent) {
            // Add event code here...
            searchSupplierPopup.hide();
        public void searchSupplier(ActionEvent actionEvent) {
            // Add event code here...
            RichPopup.PopupHints hints = new RichPopup.PopupHints();
            searchSupplierPopup.show(hints);
    package com.demo.view;
    import java.util.ArrayList;
    import java.util.Iterator;
    import java.util.List;
    import javax.faces.component.UISelectItems;
    import javax.faces.event.ActionEvent;
    import javax.faces.model.SelectItem;
    import oracle.adf.model.BindingContext;
    import oracle.adf.model.binding.DCBindingContainer;
    import oracle.adf.model.binding.DCIteratorBinding;
    import oracle.adf.view.rich.component.rich.RichPopup;
    import oracle.adf.view.rich.component.rich.data.RichTable;
    import oracle.adf.view.rich.component.rich.input.RichSelectManyListbox;
    import oracle.adf.view.rich.context.AdfFacesContext;
    import oracle.adf.view.rich.event.DialogEvent;
    import oracle.jbo.Key;
    import oracle.jbo.Row;
    import oracle.jbo.RowSetIterator;
    import org.apache.myfaces.trinidad.model.RowKeySet;
    public class TestBean {
      private RichTable tsupportIssues;
      private List<SelectItem> lovValue;
      private List<SelectItem> actualList;
      private RichSelectManyListbox prp1;
      private List valuesChoosed = new ArrayList();
      private UISelectItems selectedItems;
      private RichPopup searchSupplierPopup;
        public TestBean() {
        super();
      public void setTsupportIssues(RichTable tsupportIssues) {
        this.tsupportIssues = tsupportIssues;
      public RichTable getTsupportIssues() {
        return tsupportIssues;
      public void testMethod(ActionEvent actionEvent) {
        // Add event code here...
        // For learning purposes - show Select Many Button clicked 
         System.out.println("Select Many Button has been Clicked");
        // // RowKeySet Object can hold the selected rows from a user as follows    
        RowKeySet rksSelectedRows =         this.getTsupportIssues().getSelectedRowKeys();
        // Iterator object provides the ability to use hasNext(), next() and remove() against the selected rows 
        Iterator itrSelectedRows = rksSelectedRows.iterator();  
        // Get the data control that is bound to the table - e.g.
        // OpenSupportItemsIterator    
        DCBindingContainer bindings =         (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry(); 
        DCIteratorBinding dcIteratorBindings =         bindings.findIteratorBinding("findAllContactsIterator"); 
        // Information from binding that is specific to the rows  
        RowSetIterator rsiSelectedRows =         dcIteratorBindings.getRowSetIterator();   
        // Loop through selected rows  
        int i=1;
        while (itrSelectedRows.hasNext()) {        
          // Get key for selected row    
          Key key = (Key)((List)itrSelectedRows.next()).get(0);  
          // Use the key to get the data from the above binding that is related to the row      
          Row myRow = rsiSelectedRows.getRow(key);         
          // Display attribute of row in console output - would generally be bound to a UI component like a Label and or used to call another proces       
          System.out.println(myRow.getAttribute("name"));
          valuesChoosed.add(myRow.getAttribute("name"));
    //        actualList = new ArrayList<SelectItem>();
    //        String j = Integer.toString(i);
    //        actualList.add(new SelectItem(j, (String)myRow.getAttribute("name")));
    //      i++;
           searchSupplierPopup.hide();
          AdfFacesContext.getCurrentInstance().addPartialTarget(prp1);
      public void setLovValue(List<SelectItem> lovValue) {
        this.lovValue = lovValue;
      public List<SelectItem> getLovValue() {
        return lovValue;
      public void setActualList(List<SelectItem> actualList) {
        this.actualList = actualList;
      public List<SelectItem> getActualList() {
        actualList = new ArrayList<SelectItem>();
        if(valuesChoosed.size()!=0){
        for(int i=0;i<valuesChoosed.size();i++){
          actualList.add(new SelectItem(valuesChoosed.get(i), (String)valuesChoosed.get(i)));
        else{
          actualList.add(new SelectItem("1","Select One"));
        return actualList;
      public void setPrp1(RichSelectManyListbox prp1) {
        this.prp1 = prp1;
      public RichSelectManyListbox getPrp1() {
        return prp1;
      public void setValuesChoosed(List valuesChoosed) {
        this.valuesChoosed = valuesChoosed;
      public List getValuesChoosed() {
        return valuesChoosed;
      public void getValues(ActionEvent actionEvent) {
        // Add event code here...
        for(int i=0;i<valuesChoosed.size();i++){
          System.out.println(valuesChoosed.get(i));
      public void getSelectedValues(ActionEvent actionEvent) {
        // Add event code here...
         for(int i=0;i<this.getLovValue().size();i++){
             System.out.println("Selected Value:"+this.getLovValue().get(i));
      public void removeSelectedValues(ActionEvent actionEvent) {
        // Add event code here...
        for(int i=0;i<this.getLovValue().size();i++){
            System.out.println("Selected Value:"+this.getLovValue().get(i));
            System.out.println(this.getLovValue().remove(i));
          AdfFacesContext.getCurrentInstance().addPartialTarget(prp1);
      public void setSelectedItems(UISelectItems selectedItems) {
        this.selectedItems = selectedItems;
      public UISelectItems getSelectedItems() {
        return selectedItems;
        public void setSearchSupplierPopup(RichPopup searchSupplierPopup) {
            this.searchSupplierPopup = searchSupplierPopup;
        public RichPopup getSearchSupplierPopup() {
            return searchSupplierPopup;
        public void cancelPopupSearch(ActionEvent actionEvent) {
            // Add event code here...
            searchSupplierPopup.hide();
        public void searchSupplier(ActionEvent actionEvent) {
            // Add event code here...
            RichPopup.PopupHints hints = new RichPopup.PopupHints();
            searchSupplierPopup.show(hints);
    Thanks,
    A. Abhijit

Maybe you are looking for