User or group column is populated with incorrect values when adding data from CSOM

Hi All,
I am working on a console application that updates list items using managed CSOM. I have a user or group column in this list that can contain multiple values. Now, I am using below code to update the value of this column:
User newUser = web.EnsureUser("LoginName");
context.Load(newUser);
context.ExecuteQuery();
FieldUserValue userValue = new FieldUserValue();
userValue.LookupId = newUser.Id;
listItem["User"] = userValue;
The issue is if i assign the value of user1 to this column, the value that I see after the column is updated is another user; like user2. I don't know why it is populating this code with some other user? 
Any idea on this issue? Thanks in advance.

try these links:
http://blogs.msdn.com/b/kaevans/archive/2013/11/30/setting-a-sharepoint-person-or-group-field-value-with-csom.aspx
http://stackoverflow.com/questions/637859/sharepoint-group-by-is-broken-when-using-allow-multiple-values-for-a-column
http://stackoverflow.com/questions/26815640/caml-person-or-group-field-with-multiple-values
Please mark answer as correct if it is correct else vote for it if you find it useful

Similar Messages

  • " (quotes) is column values when loading data from csv to oracle table

    I am loading a data from csv file to an oracle table.
    After the data is loaded , lets suppose the value in one column is X.
    when i write a query to fetch data like
    select * from table where col='X' then it gives no output.
    On investigating it was found that the value is stored in col as "X".
    This also happens when i copy paste the value from column to some text editor ....
    i want to remove these double quotes , and also want to know why these are coming...
    Any suggestions guys ?
    Thanks
    Using Oracle 10g

    These quotes are part of your data file. Most CSV-parsers remove those quotes.
    If you are using an external table you can remove them by something like this for your access parameters
    ORGANIZATION EXTERNAL
      TYPE ORACLE_LOADER
      ACCESS PARAMETERS
        RECORDS DELIMITED BY NEWLINE
        FIELDS TERMINATED BY ','
        OPTIONALLY ENCLOSED BY '"'
    But if you want to remove them from your existing data use this
    update your_table
      set col1 = trim( '"' from col1 )
    Note that in some CSV-files wich use an enclosing character the enclosing character is itself is used as an escape character to use the enclosing character inside a field.
    For example a field might be "Some text with ""this"" enclosed"
    To correct these fields you might use another update
    update your_table
      set col1 = replace( col1, '""', '"' )

  • How to create users and groups using WLST Offline with Weblogic 8.1.4

    How to create users and groups using WLST Offline with Weblogic 8.1.4?
    Any ideas?

    Hi this is how i created a user using WLST Offline?
    cd('/Security/' + domainName)
    # Delete the default user name weblogic
    # incase you want to remove the defualt user weblogic
    delete('weblogic','User')
    # Creating a new user defined
    create(userName, 'User')
    # Setting the password of the user you created.
    cd ('/Security/' + domainName + '/User/' + userName)
    cmo.setPassword(password)
    Regards
    Makenzo

  • Trying to d/l Kindle ap to new iPad w/retina display.  User ID is pre-populated with incorrect email address. How can I change this to my Apple User ID?

    Trying to d/l Kindle and Amazon aps to new iPad w/Retina Display.  User ID is pre-populated with the incorrect email address for my Apple account.  How can I change this to my correct Apple User ID?

    You should setup as new.
    Settings>General>Reset>Erase all content and settings

  • Why do I get a class conflict between the Prepare SQL.vi and the Get Column Name.vi with the SQL Toolkit compatibility vis from the Database Connectivity Toolkit?

    I have done extensive programming with the SQL Toolkit with LabVIEW versions through 6.1. My customer now wants to upgrade to Windows 7, so I am trying to upgrade to LabVIEW 2009 (my latest purchased version) using the Database Connectivity Toolkit, and the SQL Toolkit Compatibility vis. Everything seemed to be going okay with the higher level SQL operations, but I ran into trouble with the Get Column Name.vi. 
    The pictures below show the problem. The original SQL Toolkit connected the Prepare SQL.vi with the Get Column Name.vi with a cluster of two references, one for connection, and one for sql. The new compatibility vis have a class conflict in the wire because the Prepare SQL.vi contains a cluster with connection, and command references, but the Get Column Name.vi expects a cluster with connection and recordset references. 
    How do I resolve this conflict?
    Thank You.
    Dan

    I've never worked with the old version of the toolkit, so I don't know how it did things, but looking inside the SQL prep VI, it only generates a command, and the the column name VI wants a recordset. I'm not super familiar with all the internals of ADO, but my understanding is that is standard - you only have the columns after you execute the command and get the recordset back. What you can apparently do here is insert the Execute Prepared SQL VI in the middle and that will return what you need.
    I'm not sure why it worked before. Maybe the execute was hidden inside the prep VI or maybe you can get the column names out of the command object before execution. In general, I would recommend considering switching to the newer VIs.
    Try to take over the world!

  • Can't reconnect to sync from work - firefox login fails with "Incorrect password" when I know it is correct

    I can happily connect my home computers and phone to sync and I have confirmed they sync between themselves. However, my work computer has recently stopped being able to sync where it has previously been fine for well over a year. I am on the latest version of sync and Firefox 35.0.1 (both at home and work).
    When I try to reconnect to sync I am directed to the "Sign in to continue" page. It has my correct email address/account name. I enter my password (clicking "Show" to make sure it's correct) but then it always fails with "Incorrect password" in a red banner at the top. I have checked the password is correct and logged out and back in from home using the same password so I know that is correct. I have tried this logged in to work via remote desktop so I could do both at the same time to make sure there isn't just a prevailing sync server problem.
    Obviously my work computer is behind a proxy/firewall. I have recently had to add a new certificate as a result of proxy changes to get internet connectivity working. Anecdotally, I think sync stopped working at a similar time - but it's always easy to remember these things differently when you're looking for a solution. So this could be a red herring.
    Your help in getting this fixed would be much appreciated!

    Thanks for your reply.
    i've deleted all cookies, although I don't really understand how that relates. I have also spoken to our sysadmin who says we don't block access to firefox accounts per se, we do block all file-esque uploads. However, I am not sure this would make any difference to the exact problem I am seeing which is that I can't sign in to my firefox sync account. But maybe signing in to this account is different to a "normal" account - maybe there is more of a two way handshake which relies on sending some encrypted data which appears to our proxy like a file being uploaded out of the company.
    I got a slightly different error on my latest clear down and retry, in that the sign in just waited forever (overnight) without success.
    Any further help gratefully received...

  • Problem with binding value on the UI  from a calculated column in the view

    I have calculated field "Readiness" in my db view, which gets calculated based on other columns in the same table. I have added new column to my EO using "Add from table" option and added the same column from to VO using "Add from EO" option. In my application, I will update a particular date field in the UI and this calculated column "Readiness" in the db will be set to yes or no and this logic is working fine, both date date field and calculated field are in same view object. I have added a attribute binding to this "Readiness" column in my view page. The problem is the calculated column value does not reflect the new value in the db, it shows the old value. I have tried different refresh option for the iterator and ppr option for the field binding. Even after reloading the page, the value shown on the UI page is different from the value in db, other bindings on the UI page works fine, not sure any special settings are required for the Calculated columns. any ideas are appreciated.
    Thanks for your help,
    Surya

    I tried to add soms debugging statements in the EO and getters method, the calcaulated column is not picking the value in db view. I'm not any special iterator/field settings are required at BC level. I'm a newbie, any help is appreciated.
    Thanks,
    Surya

  • AD Group membership not updating in Sharepoint Foundation when adding Active Directory group to Sharepoint group

    I have Sharepoint Foundation installed with the latest CU updates.  It is running on a VMware box (Windows Server 2008 R2 Standard) with its backend on a SQL Server 2008 R2 vmware box.  The farm account is a domain user and has been given all appropriate
    replication rights, etc to active directory.
    Everything seems to be working fine except for security integrated with AD groups.  When I go to edit permissions I can add individual AD users just fine and remove them just fine and their access is taken away right away or given to them right away.
     I can also find AD groups in the people picker and add them to the site. When I add new groups to AD, they are found immediately within Sharepoint, and when I delete groups from AD, they are taken out of the people picker right away.  Now comes
    the weird part.  When I add an AD group to the site, all users currently within that AD group are given access to the Sharepoint Site.  This works for the first time only.  Now when I add or remove users from the AD groups, it does not update
    in SharePoint.  For example, I have an AD testuser1 in the AD Group "All Users".  testuser1 does not have access to SharePoint.  So I add  the AD group to the Sharepoint group "Visitors".  testuser1 now has read access to the sharepoint
    site.  Now, I remove testuser1 from the AD group, but testuser 1 still has access to the site even though he is not part of the AD group, nor does he have any individual permissions to the site.  Now, I add testuser2 to the ad group.  testuser2
    does not have access to the site, even though he is part of the ad group.
    It seems that the only time AD group security is working for me is when I first initially add the AD group to the site.  From then on, it's like sharepoint is caching the members of the group and not updating any new adds or deletes from the groups.
     Any ideas?  I am lost on where to go from here as I have tried everything from clearing cache files, rebooting servers, iisresets....

    I think I have at least cornered the problem, but am not 100% sure yet that it is the correct answer.  I think it could be 1 of the following 2 scenarios.
    Scenario 1:  We have 3 web applications setup on our web server ports 80 - Our sharepoint Web app, 2020 - Our My Site Web App, 2040 - Our Search Web app.  We are using host headers (http://sharepoint.***.com) instead of a server name.  So
    we setup our access mappings (Central Admin -> Application Management -> Configure Alternate access mappings) to use the host header (http://sharepoint.***.com) as the default mapping and the server name as the intranet access mapping.  By
    setting the default access mapping to host headers, i noticed that Sharepoint automatically assumes that all web apps are on port 80.  You can see this by going to (Central Admin -> Manage Web Applications).  The port listed all 3 web apps on
    port 80.  So I think when I was doing a profile sync and using mysites, it was messing with my AD security because of this.  What I did was the following.  I went to Central Admin -> Manage Service Applications -> [Name of your user profile
    service] -> Setup my sites.  I made sure that my preferred search center had the correct port number on it (mine originally had no port number), that my my site host had a port (again no port number originally), as well as the personal site location.
     I then saved this.
    Scenario 2:  Our user profile sync had 2 BDC connections that were corrupt and throwing errors.  I rebuilt the connections, remapped them to the proper user profile property.
    I did both of these scenarios above around the same time.  I then restarted all my servers, and at last the AD Group security is now functioning appropriately.  I have done multiple IIS resets and server restarts.  The issue has only reappeared
    once.  After restarting the machine again, we were back to the AD groups functioning correctly.  Because we had the issue reappear once after doing the above, I still do not feel 100% sure that either one of the above corrected the issue completely.
    As long as we are up and running currently, I am moving on to other tasks with this project.  My only concern that it will break again and I will have to revisit it is when we restart the servers....which is never fun.  I will update as I find
    a "true" answer to this issue....  Let me know if any of the above helped you or if you find something I may not have thought of.

  • Help needed with variable - trying to get data from Oracle using linked svr

    Sorry if I posted this in the wrong forum - I just didn't know where to post it.
    I'm trying to write a simple stored procedure to get data from an oracle database via a linked server in SQL Enterprise manager. I have no idea how to pass a variable to oracle.
    Here's how I would get the variable in SQL:
    declare @maxkey INTEGER
    select @maxkey= MAX(keyfield) from [server].Data_Warehouse.dbo.mytable
    select * from [server].Data_Warehouse.dbo.mydetailtable where keyfield=@maxkey
    the select statement I need to do in oracle would use that variable like this:
    select * from OPENQUERY(OracleLinkedServer,'select
    * from ORACLEDB.TABLE where keyfield > @maxkey')
    and I get this message: OLE DB provider "OraOLEDB.Oracle" for linked server "OracleLinkedServer" returned message "ORA-00936: missing expression".
    I realize that I can't pass the @maxkey variable to oracle - so how do I accomplish this?

    Please refer the example in this link which deals with Oracle date format.
    You can finnd a command DECODE which is used for date formats. If you have a look at whole theory then you will get an idea.
    Link:[Bulk insert SQL command to transfer data from SAP to Oracle|http://sap.ittoolbox.com/groups/technical-functional/sap-dev/bulk-insert-sql-command-to-transfer-data-from-sap-to-oracle-cl_sql_connection-3780804]

  • SQL Error when adding data with UDO + Form

    Good morning, friends.
    Initially, I apologize for any mistakes in my English.
    I am developing an addon for a client and now I came across a problem that started happening about 5 days ago:
    I customized a MasterData postcodes in B1, I created a UDO (oCNSTCEP) and bind to a form created by the Screen Painter. It is noteworthy that this program has been operating without any problems in the customer environment for at least 3 months. Finally, for reasons unknown to the system now has to give the following message when I insert a new record:
    [Microsoft] [SQL Server Native Client 10.0] [SQL Server] Conversion failed When converting the nvarchar value 'oCNSTCEP' to data type int. (CINF)
    The strange thing is that the record is written into the UDT corresponding to the UDO. But the error message is given, giving the user the impression that the routine was not completed successfully.
    Yesterday you told me what is happening the same error in another form, ie, the way any given recording through UDOs are giving problem.
    I searched for this post in SDN and the maximum that I discovered is that it could be happening because of the variable @ object_type in SBO_Notification be as int instead of being as nvarchar (20). I checked the stored procedure and @object_type is nvarchar(20) type.
    I would like to help for a solution to this problem. Since now, thank you!
    Sincerely,
    Junior

    The error is coming from the stored procedure and is easy to fix,
    Anywhere where you check the @object_type, you need to put the value in single quotes.
    e.g if your stored proc includes both of these:
    IF @object_type = 17
    IF @object_type = 'oCNSTCEP'
    It will fail with the error you mentioned. But if you have:
    IF @object_type = '17'
    IF @object_type = 'oCNSTCEP'
    It will work.

  • Populating selectboxes in form by retrieving data from oracle table

    hi guys...im a student .......i was thinking if someone could help me out.
    i am woking on a project which is being built using JSP with EL.(jstl)
    My problem is.......i have 2 interdependent select boxes in my form,which are CATEGORY and SUB CATEGORY. I could populate the first select box dynamically by extracting the values from the database table CATEGORYDATATABLE as foll:
    <sql:query var="q1" sql="select distinct(type) from catgorydatatable"/>
    <select name=selectbox1>
    <c:forEach var="a" items="${q1.rows}">
    <option>${a.type}</option>
    </c:forEach>
    </select>
    but the problem poped up when i tried to populate the second select box which is the subcategory.
    ie for example
    **if i select category as STUDENT from the first select box the second one should get populated with a of all student names......
    **on selecting category as Employee in first select box i should get to see all employee names in second select box and these names are to be extracted from the table.
    i tried the following code but it isnt working:
    <sql:query var=q2 sql="select subtype from categorydatatable where type=${param.selectbox1}"/>
    <select name=selectbox2>
    <c:forEach var=b items="${q2.rows}"/>
    <option>${b.subtype}</option>
    </select>
    please do help me with this.....i'd be very thankful on recieving a sample code on this
    thank u....
    shireeesha

    >
    After installing the ODAC package, I can now see a list of new drivers., including:
    1) Oracle in OraClient11g_home1This one is the one you installed when you installed the Oracle client.
    2) Oracle in XEThis one was installed when you installed XE on the system.
    Which one should I chose? I would have expected a Oracle Client in XE. Is there another ODAC package for the Express edition? I could not find any.I'd use the first one, though I don't use XE so have no experience with it. They're probably the same or very similar clients in this case.
    When I get into the Oracle ODBC Driver Configuration, it asks me for:
    TNS Service Name
    However, the dropdown box appears empty. Could you provide me a pointer on how to continue with the TNS Service name?There is a bug with the 32 bit driver that makes the dropdown always empty. You can just type the name in.
    Of course, that means you need to know the name. XE may have set that up for you already. Go to where you installed XE and look for a tnsnames.ora file, typically in the \network\admin folder. If your local database is set up there, you can copy that file to the same place in the other Oracle client's installation folder (\network\admin), and then type in the TNS name (that's the name before all the stuff in brackets).
    If there isn't one already set up, you'll have to create it and for XE I honestly have no idea how to do that. My DBA does it for all our databases. :)

  • Incorrect Value In master DATA

    Hi Everyone,
    I am getting incorrect data for attribute "Standard Price" of 0MAT_PLANT Master Data. This issue is there only for single record of 0MAT_PLANT value.In PSA data is correct as it is matching with R3.
    everyday there is  full load in 0MAT_PLANT,it as per business requirement.
    Eg
    provider level
    Plant: ABCd
    Standard Price : 40
    PSA Level:
    Plant: ABCd
    Standard Price : 0.75
    Note: here Standard Price is correct figure which i am getting.
    Observations:
    1. when i run dtp only for this record, i am getting correct Values.
    2. In debugging of mode of DTP  i am too getting correct Value
    Regards
    Nadeem

    Hi Nadeem,
    From your reply, I understood that, when you load single value, that record updated correctly.
    But, when you load all the entries, You see, there's problem. Recently, I have resolved same kind of issue.
    Details are given below :
    Example :
    When it's single record :
    Material  -   Price 
    MAT001 -   10
    And the same is entered into Target correctly.
    When, it's full load,
    In PSA, We had entries as follows :
    Customer  -   Price 
    MAT001      -  10
    MAT001-1  -   20
    MAT001-2  -   30 ,
    After transformation,
    These values are converted as follows :  
    Due to some issue in Transfer Routine (Some logic)
    MAT001      -  10
    MAT001      -   20
    MAT001      -   30
    So, Since the Key's are same, in Duplicate key check,
    Last record was taken :
    MAT001      -   30
    We see, wrong price for MAT001.
    So the Suggestion is, in Info Package data selection,
    Don't give the exact value for single record execution.
    Give filter like,
    MAT001* .
    So that, Info Package will pull all the three entries and You can check the DTP for any duplicate message. Then, We can figure it out.
    Assign points if this reply helps you.
    Thanks,
    Jay.

  • Trouble with People Picker When Adding an InfoPath form to a form library

    I have a site in SharePoint 2013 with a Form Library that uses an InfoPath form as its default template. Everything was originally created in 2010 (SharePoint 2010 / InfoPath 2010). When we upgraded to SP2013, I still had InfoPath 2010 and I noticed that
    the people picker wasn't working (if I recall, I would just get ignored if I tried to click to open the address book). I have now upgraded to Office 2013, but when I click to open the address book for the people picker, InfoPath crashes. 
    I did some googling and tried the solution I found here:
    http://www.zoutenbier.nl/kb/sharepoint-2013/infopath-filler-2013-crashes-with-sharepoint-2013-when-using-people-picker/
    But changing the web.config caused the people picker in SharePoint to break (if I tried to add someone to a group, the picker would tell me that it couldn't communicate with the server). 
    I'm not sure what else to try. Anyone have any ideas?

    Hi Amy,
    Have you restart your IIS when you add modify web.config on your SharePoint server?
    http://social.technet.microsoft.com/Forums/appvirtualization/en-US/d6fa5812-64e0-4d80-94b0-0577ba43ce59/sharepoint-2013-infopath-2010-people-picker-does-not-works-when-opens-in-client-application-but?forum=sharepointcustomization
    Or you can check the following article with similar errors, remove multipleSiteBindingsEnabled setting from web.config and removed second web site binding from IIS, then check results again after iisreset.
    http://xblogs.kompas-xnet.si/post/SharePoint-Designer-2013-Crashing-when-using-select-peoplegroups-from-SharePoint-site.aspx
    Thanks,
    Daniel Yang
    Forum Support
    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 Subscriber Support, contact [email protected]
    Daniel Yang
    TechNet Community Support

  • I can capture with iMovie 6, but not with FCP 6.0 ('no data from device')

    I didn't have any problem with FCP 5, but am getting nowhere with FCP 6 using the same settings (I think). FCP seems to see the camcorder, but can't control it and, even if I manually start the camera, reports 'no data from device' when I do a 'Capture Now'. Device control isn't critical, but I'd sure like to find out why it doesn't see the data stream from the camera (Sony HDR-HC7 / FW400). I must be missing a setting some place, but sure can't find it. On the other hand, I have full device control and zero dropout capture with iMovie (exact same hardware configuration). Any ideas?

    Wolfgang Matzl wrote:
    canopus works fine, as well as all other devices.
    i have tons of tapes and tried a few, none worked.
    i tried to capture on both my new imac and my mbpro, no way.
    but now i'm sure there is something wrong with the sony handycam, i tried to import with my old final cut studio, and it's not possible, also. fc pro says: waiting for timecode.
    so i'm confused now. does the sony dcr-trv not send a timecode? maybe, and this will explain the troubles. but on the other hand i imported successfully some footage with exact this device.
    maybe i used the canopus then to correct the timebase, i can't remember how i did it. but this would mean i have to accept loss of quality, since i have to connect the sony with s-vhs with the canopus and convert it.
    right now i'm importing a tape with imovie and will have a look how the result is, but as far as i remember, the audio has to be re-rendered when importing in fcpx…
    My finger is pointing to a Timecode issue.
    Is timecode enabled in the camera?
    Is it continuous on the tape?
    Al

  • Issue with variable values while adding report to Bookmarks/Favorites

    Hello All,
    I am able to save the reports from my portal as bookmarks with the appropiate navigation state & variable values for reports which do not have a mandatory value variable with no default value. For all other queries like queries with no mandatory variables or queries containing mandatory variables with default values, this is working fine. Any inputs is appreciated. We are in BI7.0 with SP12.
    Thanks,
    Danny

    What's your question, because from your statement, it seems like everything is fine ??
    Cheers,
    Andrew

Maybe you are looking for