Batch Operation for LookUp Column in SharePoint

Hi
I am trying insert bulk data into list.
For that I am using Batch Process .But the problem i am facing is if the column of type is "LookUp" I am not able to apply batch
Can you please help me like "What is the column format in Batch Operation for "LookUp column.
Thanks
Siddartha

Hi Siddartha,
The structure of the look column is id;#Value, so you can set the lookup column like this:
 <Method ID='2' Cmd='New'><Field Name='CustomerID'>1;#Cust_1</Field></Method>.
You can refer to the link below:
http://dotnetstep.blogspot.in/2009/01/batch-update-in-sharepoint.html
Best regards.
Thanks
Victoria Xia
TechNet Community Support

Similar Messages

  • Setting default value for lookup column in Sharepoint 2013 via powershell

    Hi,
    when I try to use the 2010 version of setting a default value to a lookup column ( colum.defaultvalue="1;#Open"), this is not longer supported in SharePoint 2013. The defaultvalue is always the alphabetically sorted first entry in the source
    list.
    How can I change this?
    Thanks for any help.
     Lutz

    Hi Lutz,
    You can set the default value of a look-up column. The code is very simple, just need to take care of the code below.
    $w = Get-SPWeb http://web
    $l = $w.Lists["MyDocumentLibrary"]
    $lf = $l.Fields["lookupColumn"]
    $i = $l.Items[0] #List item to update
    $lf.ParseAndSetValue($i,"1;#lookupvalue") #1;#lookupvalue refers to the ID of the lookup item and the value of the lookup item.
    $i.Update()
    As another example, if I wanted to update all the items in my document library that had the lookup value
    Pending, with the lookup value Complete;
    $w = Get-SPWeb http://myweb
    $l = $w.Lists["MyDocumentLibrary"]
    $lf = $l.Fields["lookupColumn"]
    foreach($i in $l.Items)
    if($i["lookupColumn"] -eq "1;#Pending")
    $lf.ParseAndSetValue($i,"2;#Complete")
    $i.Update()
    Indul Hassan
    Microsoft Community Contributor
    http://www.indulhassan.com
    You Snooze.. You Lose !!

  • How to change the background color for lookup column options in sharepoint 2007

    Hi,
    I have a custom List with 10 fields,and in the edit form we want to display only 6 fields,
    So I have customized it with sharepoint designer 2007 ,designed a new custom edit form(Insert->ShaerPoint Controls->Custom List Form)
    We are using IE8 Browser,and the site has JQuery 1.8 loaded .
    The lookup columns is getting rendered as textbox and dropdown arrow image,instead of select html element.
    When we click on arrow image,its displaying the values magically,So I am unable to highlight the options with text "ABC" in yellow background color
    basically in the input textbox its storing all the lookup values as "ID|value "in choices attribute (I saw this in browser dev tools)
    I tried to set the textbox color everytime it loses focus using blur,however its always returning the previous value instead of current selected value.
    Is there any way we can achieve this,Any solutions/thoughts
    Thanks everyone..

    hi i bet you need to amend your jquery script to get onclick values and put it with like append HTML if you want to use Jquery.
    Also did you know you could use javascript in calculated column with type number?
    Check:
    http://sharepointwijzer.nl/sharepoint-blog/tech/icc-html-calculated-column-sharepoint-view
    Imposible is nothing

  • How do I strip special characters in SSRS for Lookup columns with Multiple Selections?

    Hello all,
    Please let me know if I am posting in the wrong location.
    I am building reports against my SharePoint List (actually a library).  1 of the columns I want to display in the report is a Lookup column that allows Multiple lookups.  Problem is that the SharePoint Web Service call GetListItems returns the values with the item id and ";#" combination.  For example:
    122;#Apple;#112;#Carrot
    but I need the following format:
    Apple, Carrot
    Following this great article posting - http://www.sharepointu.com/dwise/archive/2007/11/28/connecting-sql-reporting-services-to-a-sharepoint-list-redux.aspx
    I was able to drop the first part using the following code
    function GetNameFromSP(pFullID as string) as string
      dim strRet as string
      dim iPos as integer
      if pFullID = nothing then return ""
      if pFullID = "" then return ""
      iPos = Instr(pFullID, ";")
      if iPos < 1 then return pFullID
      return Mid(pFullID, iPos +2)
    end function
    But it does not replace the subsquent id references.
    Anyone done this before that can provide me tips?
    Thanks!
    Jeff Kozloff
    Project Manager, Solutions Team
    Bamboo Solutions
    http://www.bamboosolutions.com

    All,
    Here is the updated code that resolves my issue (a coworker of mine provided the following code):
    Function TrimMultiLookup(ByVal s As String) As String
            Dim combStr As String
            Dim array As String()
            Dim c As Integer
            combStr = String.Empty
            array = Split(s, ";#")
            Console.WriteLine(array.Length)
            For c = 1 To array.Length - 1 Step 2
                combStr += array(c) + ", "
            Next
            Return Left(combStr, combStr.Length - 2)
        End Function
    Jeff Kozloff
    Project Manager, Solutions Team
    Bamboo Solutions
    http://www.bamboosolutions.com

  • Title and description for lookup column

    Hopefully this can be simple.  I am working on development in SharePoint 2010 but I do NOT think that it is specific to 2013 or 2010, I am migrating to 2013 in a month or so (hopefully!)
    Requirement:
    Display lookup list for Server Name (Title) and Server Description (Description)
    Problem:
    I have a custom list with 2 columns, title and description, both text fields.  I am using that list as a lookup to my other custom list.
    The graphic below has 2 windows squished into it.  The middle window is the list pulling the data from, the lookup list.
    The graphic to the right is the issue that I am running into.  I create the column and hopefully I can use the lookup column with the title column AND THEN the additional fields for the Description!  It DOES appear, but AFTER I fill out the form. 
    The form is on the left part of the graphic below.
    I see the server names or "Title" but I can't even "hover" over it and see the description!  I don't know how to present the description lookup in the form when I do "new item."  Is this something that 2010 / 2013
    can do and OOTB or do I need designer? I don't code so I can't use VS.
    Thank you!
    Matt

    Thank you, I created a calculated column, using Microsoft's recommendations below, and Scott's!
    Calculated Field Formulas -
    http://msdn.microsoft.com/en-us/library/bb862071.aspx
    The result shows below.  the 3rd column is the Server and Description, with the calculated column, "merging" the two text into one, with a space and a dash in the middle to separate them.  The list is below and the "look up".  The black section
    is my new form or add new item, where I would select multiple servers based on their server name and their description.

  • Lookup column in sharepoint list column in visual studio

    Hi i have a list with two columns as student id and student name. in second list am
    taking one column as lookup and am giving reference to student name. but while inserting record in second list when am selecting student name and clicked save ,in second list i have to save student id not student name. (just like dropdown in asp.net data text
    field and data value field.) how can i achive this in sharepoint using lookup column and am creating the second list in visual studio.

    you need to create a  look up column on Name field in second list and a second look up column on the same field.
    then hide and show your fields in edit and display form based on your requirements .
    <Field
    ID="{886AF390-F68A-4B8A-9EC4-12108A11CC99}"
    Name="StudentName"
    DisplayName="StudentName"
    Type="Lookup"
    List="Lists/Students"
    ShowField="StudentName"
    PrependId="TRUE"
    Group="test">
    </Field>
    <Field
    ID="{599F97C5-564C-4DE5-BE4D-3A49DDC87FB5}"
    FieldRef="{886AF390-F68A-4B8A-9EC4-12108A11CC99}"
    Name="StudentId"
    DisplayName="StudentName:Trainer StudentId"
    Type="Lookup"
    Required="FALSE"
    ShowField="StudentId"
    List="Lists/Students"
    Group="test">
    </Field>

  • How to Prevent duplicates on Combination of Lookup columns in sharepoint 2010 using infopath 2010 form.

    Hi All,
    I have list with some Lookup columns like  City, Pin, and Text Column Name. All these are required columns.
    Now I want to prevent duplicates while submitting InfoPath form if a Combination of  City,Pin & Name. (like a Composite primary in Database is used.)
    Can some one help me on how to achieve this using InfoPath  2010 Rules, writing  rule in Xpath.
    Thanks in Advance.

    1. Add a secondary data connection to the list where the form will be submitted.
    2. Prior to submit via rules, set the query fields in the above connection: City, Pin & Name with values entered in the form. Query the data source and check if the result has values.
    3. Show error messages accordingly if exists else continue with Submit.
    This post is my own opinion and does not necessarily reflect the opinion or view of Slalom.

  • APEX_UTIL.IR_FILTER with BETWEEN operator for date columns

    Hi,
    when I run my application I can set a BETWEEN-filter for date columns. I can't find a way how to use it with the APEX_UTIL.IR_FILTER function. Maybe I miss something?
    Documentation: http://download.oracle.com/docs/cd/E17556_01/doc/apirefs.40/e15519/apex_util.htm#CHDDDFBF
    Tobias

    Tobias,
    If you think about it, a "Between" is nothing more than a single line way to say
    WHERE :X >= :Y
    AND :X <= :Z
    So you should be able to apply two filters to the report using the LTE and GTE operators
    Hope this helps
    Doug Gault
    www.sumneva.com

  • Exceptional slow batch operation for Azure Table

    I have a VM Medium with an Azure Storage.
    West Europe
    Same Affinity Group
    Different storage account for VM and for my application
    I noted that today, during the afternoon, my storage became very very slow all of a sudden.
    I was happily uploading my batches with the rate of 2 MB/S, and now, suddenly this afternoon, I started to get better than 300KB/S.
    I noticed that my network and CPU activity were very low.
    I started Fiddler, and seen that my batches of 100 KB approximately took 14 second to upload !
    I tested the same program on a VM in a different subscription with different affinity group, the same exact same batch took 200ms approximately.
    What can do enjoy my full speed again ? Seems like a mouse is eating the cable of my rack.

    Update :
    I eventually it the threshold with a new table, my insert on the other table are starting to take more than 2 seconds to process, and it goes up with time.
    So, insert is not constant, but depend on partition's size. Is it normal ?
    Niranjan Nilakantan of Microsoft said
    If the key for your logical data model has more than 1 property, you should default to (multiple partitions, multiple rows for each partition).
    If the key for your logical data model has only one property, you would default to (multiple partitions, one row per partition).
    We have two columns in the key to separate what defines uniqueness(PartitionKey and RowKey) from what defines scalability(just PartitionKey). 
    In general, write and query times are less affected by how the table is partitioned.  It is affected more by whether you specify the PartitionKey and/or RowKey in the query.
    If this is true, there is a real problem with my storage node.

  • How to filter lookup column in sharepoint 2010

    Hi,
       I have three list, Designation, Employee & Client respectively. Designation have one column as Designation having values like director,hr,etc. The designation column is lookup in employee list in which other columns are empName, empAddress
    etc. Now in my client list there is Client name field & another fields are director & hr. So now i wanted to filter all those employees having designation director & hr from employee list to my client list's director & hr field respectively.
    so how can i achieve this?

    Take a look at this codeplex project:
    http://filteredlookup.codeplex.com/
    Or via this way (SharePoint Designer - Datasource:
    http://sharepointbergen.blogspot.com/2007/04/creating-filtered-lookup-fields-in.html
    Regards, Marijn Somers|| http://www.beyond-it.be || Twitter: http://twitter.com/marijnsomers || http://marijnsomers.blogspot.com

  • How to use Batch operation for two xsodata services?

    Hi All,
    I have two xsodata services. How to use submit batch for two xsodata services
    Thanks,
         Mj

    Gateway Batch Calls from SAPUI5

  • JSLink for LookUp Column

    Hello EveryOne,
    I have two lists, the child list contain a look up column from parent list, child list has a column/Field like people picker which is also available in parent list, now I want to filter look up column according to focus out event of people picker, by JSLINK....
    Please suggest some code snippets or suggestions....??

    if u are using sharepoint 2010, see my bellow post
    custom functionality in ListForm pages
    yaşamak bir eylemdir

  • Is there a way to Insert Data into a Lookup Column Type on a SharePoint List Destination in SSIS?

    Greetings.
    I have successfully worked out inserting SQL data (2008 R2) into my 2010 SharePoint list (New, Update, Delete) by creating an SSIS Data Flow Task as outlined here:
    http://fsugeiger.blogspot.com/2010/01/synchronise-sql-table-with-sharepoint.html
    However, the problem I am running into is inserting data into the SharePoint Columns that are "Lookup" column types. I verified that all of the values I am copying from SQL into the SharePoint lookup column exist in the customn list it is pointing to. It
    is important to have this column be a lookup column as it links to another custom list that has many more columns of related information.
    I have read and re-read the SharePoint SSIS Adapters 2011.docx from
    http://sqlsrvintegrationsrv.codeplex.com/ and the only section that seems to apply is this:
    "Looking Up Values in a SharePoint List
    If you have to look up a value in a SharePoint list, you can use the Lookup transformation in your data flow, and use the SharePoint List source to load the lookup table. You may have to add a Derived Column transformation or a Script component that splits
    data in the lookup column on the ";#" delimiter to separate the ID value from the description.
    If you are replacing values in your data with the values that you look up in the list, then loading the changed data back into SharePoint, you only have to include the ID from the lookup column. SharePoint ignores the description if you include it."
    I am not sure if the above statement means that I should be passing the assocaited ID's other than the actual data into the SharePoint List destination. If that is the case, that will not really work as the lookup contains hundreds of rows. Not too mention
    I have several of these lookup column types pointing to several different lists.
    Any guidance in how I can put data into a SharePoint Lookup column type via Data Flow Task would be so much appreaciated.
    Thank you.
    My errors are:
    Error: 0x0 at Data Flow Task, SharePoint List Destination: Error on row ID="1": 0x1 - Unspecified error, such as too many items being updated at once (batch), or an invalid core field value.
    Error: 0xC0047062 at Data Flow Task, SharePoint List Destination [1903]: Microsoft.Samples.SqlServer.SSIS.SharePointListAdapters.PipelineProcessException: Errors detected in this component - see SSIS Errors at Microsoft.Samples.SqlServer.SSIS.SharePointListAdapters.SharePointListDestination.ProcessInput(Int32
    inputID, PipelineBuffer buffer) at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostProcessInput(IDTSManagedComponentWrapper100 wrapper, Int32 inputID, IDTSBuffer100 pDTSBuffer, IntPtr bufferWirePacket)
    Error: 0xC0047022 at Data Flow Task, SSIS.Pipeline: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "SharePoint List Destination" (1903) failed with error code 0x80131500 while processing input "Component Input" (1912). The identified
    component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will

    I have found a solution to my problem and thought I would share it here in case there are others who are struggling with the above scenario. If you have a better way, I would love to hear about it since my way is a bit tedious.
    In a nutshell, in order to have an SSIS package put data from an OLE DB Source into a SharePoint List Destination Lookup Column, you need to pass the ID of the value that is being looked up, not the value that is in the “master” OLE DB source.
    Rough explanation, OLE DB Source value for column “Approp” is “4005” --> SQL matches “4005” with the ID in the new lookup table (“4005” = ID “5” as defined in the SharePoint lookup list) --> “5” gets passed into SharePoint List destination lookup
    column --> SharePoint displays “4005” and successfully links to the lookup list.
    Funny thing (not really), the error(s) outlined in my original post are not related in getting data into a SharePoint Lookup column as I am now successful in getting data into the system but I am still getting the same above error(s). I think it has to do
    with the ID column in the SharePoint list destination. What I can’t seem to figure out is why since I am not linking any data to that ID column (at least on new records). I am however linking it on Update and Delete and the errors mentioned above disappear
    and things work well.
    There are three tasks that need to get done in order to get data from SQL into a SharePoint lookup column assuming you have already set up your SharePoint lookup lists:
    1. Create new lookup table(s) in SQL that has the IDs from the SharePoint Lookup list and the values coming from the “master” OLD DB Source. You can see the ID column in SharePoint by toggling it on in a view.
    2. Create a SQL command that JOINs all the databases and tables so that the ID is passed and not the value into the SharePoint lookup column
    3. Change the “Data access mode” to “SQL Command” instead of the “Table or view” in the OLE DB Source and paste your command into the “SQL command text:” area.
    Other helpful info is that you may also need to add additional columns in the new lookup tables in SQL for the scenarios when the data is not unique. You can see this two times in my SQL command example for Units and JobTitles:
    SELECT
    pps.SSNm,
    pps.file_updated,
    pps.Employee_id,
    /* pps.CheckDistNm,*/
    Check_Distribution_id = COALESCE( d.ID, 0 ),
    pps.Job_nbr,
    pps.SeqNm,
    pps.action_eff_dt,
    Fund_id = COALESCE( f.id, 0 ),
    Appropriation_id = COALESCE( ap.id, 0 ),
    ActionCode_id = COALESCE( ac.id, 0 ),
    SpecNumber_id = COALESCE( jt.ID, 0 ),
    pps.Employee_id,
    /* pps.Fund,
    pps.Approp,
    pps.Unit,*/
    Unit_id = COALESCE( u.ID, 0 ),
    PosNm,
    PosCode,
    pps.LastName,
    pps.FirstName,
    pps.MI
    FROM
    x_PPS.aReportVw.pps_screens_active AS pps
    LEFT OUTER JOIN dbo.DistributionNumbers AS d ON
    pps.CheckDistNm = d.Check_Distribution
    LEFT OUTER JOIN dbo.Units AS u ON
    pps.Fund = u.Fund AND
    pps.Approp = u.Approp AND
    pps.Unit = u.Unit
    LEFT OUTER JOIN dbo.Appropriations AS ap ON
    pps.Approp = ap.Approp
    LEFT OUTER JOIN dbo.Funds AS f ON
    pps.Fund = f.Fund
    LEFT OUTER JOIN dbo.ActionCodes AS ac ON
    pps.ActionCode = ac.ActionCode
    LEFT OUTER JOIN dbo.JobTitles AS jt ON
    pps.SpecNm = jt.SpecNumber AND
    pps.JurisClass = jt.JurisClass

  • Move sharepoint 2010 list to 2013 with lookup columns

    Hi all,
    Iam planning to move my sharepoint 2010 list to 2013.I done this using save site as template.But the look up columns are showing empty data.Can u please let me know the best solution to do this.
    Regards,
    Praveen

    The reason the lookup column doesn’t work anymore in your SharePoint 2013 list is because Save
    Site as Template, preserve all the list settings. Therefore, the lookup column still points to the original list which
    was located on your SharePoint 2010 list. The lookup column stores GUID of the web, list, and the field to which it points
    and GUID are unique IDs that identifies a list/library/site/feature in a farm.
    Using SharePoint Manager you can find the LookupList, LookupWebId and LookupField of
    your old SharePoint 2010 lookup column and compare it with your new 2013 lookup column. You will see the difference.
    There are two approach to get your values in lookup again.
    1(a). Create a new list and update the lookup values.
    1(b). Delete the lookup column and create a new lookup column and point it to the new list created in the above point.
    2. Update the SchemaXml property
    of the lookup column through SharePoint Manager.
    I will provide you with a good reference on how to use SharePoint Manager while managing your lookup columns. http://blog.johnsworkshop.net/moving-lists-with-lookup-columns-inside-your-site-collection/
    Please remember to click 'Mark as Answer' and Vote as Helpful if the reply answers your query.

  • How to query the sharepoint list with using lookup column

    hi,
    I have requrement like below
     List A
    Title                         Postionid(Lookup)       PositionDescription
    [email protected]             1                              
    xxxx
    [email protected]             1                               
    xxx
    [email protected]           1                                
    xxx
    [email protected]                    2                               
    sss
    [email protected]             2                               
    www
    List B
    Title                         fistname  lastname age fathername
    [email protected]         x             x             10      y
    [email protected]         p            p               12      p
    [email protected]               q           q                12    
    y
     here in List A positionid is lookup column i have creating one visual web part i am querying the List A using  query string as Positionid in that web part .finally what i want is i need date from list B on basis of corresponding position id here
    List A Title and List B title are same i need each candidate info how can i do it
    Srinivas

    Hello,
    Still you have not told that whether Position id is there in listB or not. Anyway if Poistion id is not there in list B then you have to use Title column of listA to gete data from ListB. Look at sample code below. It will first get data from ListA,
    and use StringBuilder class to create dynamic CAML query because one Position id is having multiple values in listA.
    query.Query = "<Where><Eq><FieldRef Name='Postionid' /><Value Type='Lookup'>1</Value></Eq></Where>";
    SPListItemCollection items = list.GetItems(query);
    if(items.Count > 0)
    foreach(SPListItem item in items)
    string strTitle = Convert.Tostring(item["Title"]);
    //since listA is having multiple values for Postionid so you have to build a dynamic query here to get data from listB
    //Refer link to build dynamic query
    SPQuery listB = new SPQuery ();
    query.Query = stringbuilder;
    SPListItemCollection ListBitems = listB.GetItems(query);
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/2dfe5fd6-e556-4132-a35c-e9f240360307/issue-with-caml-query?forum=sharepointdevelopmentlegacy
    http://sharepoint.stackexchange.com/questions/69690/foreach-loop-inside-caml-query
    Above links will help you to create dynamic query (in your case you need to use multiple <OR> operator in listB.
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

Maybe you are looking for

  • How do I install mavericks on a macbook with out the app store?

    Okay, so this has been very annoying lately. So, long story short, I had to erase my HDD on my Macbook Pro which erased my operating system, and I do not have an OS X install disk. Is there a way to get OS X Mavericks with out having to go to the app

  • Play...Stop...Play .....Stop

    Occasionally my iphone 3G stops a song while in play when using earbuds or portable speaker ... sometimes it will occur once during the song...other times it can happen up to 10 times. So aggrevating! Does anyone have this problem? If so.... any reme

  • Problem in Assembly Processing in Project System

    Hello All, My Client want to implement Assembly Processing. We have configured the system as per SAP Standard. we are testing this in Quality System along with SD & PP Modules. we have template which contain Material WBS Process WBS & Other Cost WBS

  • Internet Explorer message "refer to popup window"

    Hi everyone, Value some help please. When visiting my work's website with Internet Explorer on a new Lumia 625, the message "refer to popup window" appears after I log in. Unfortunately, unlike using a desktop or laptop, no new tab appears. A new tab

  • Need help with Tiger & XP network setup

    Hi all! Back in the days of OS 7.5, I managed to stick my old faithful Mac onto my family's otherwise all-PC network. All I really needed was internet access - I didn't try to fileshare. Now that I have Tiger, though, I'm totally lost as to how to se