.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Commit submitting duplicate entries in list

Posted By:      Posted Date: October 13, 2010    Points: 0   Category :SharePoint

Hello Experts,

I have built a simple aspx page from sharepoint designer, where I am using Custom List Item to create my own new Item form for a defined list.

Initially all working as expected when I create an item from the form using the default Ok button.

Now I want to modify it a bit.

I want to create my own 'submit' button, the reason being that I want the user to click on the 'submit' button, it submits the data (creating an item entry in the list) and then it loads the form again(i'll pass some parameters in the URL later, that not my real problem now).

I have defined the current actions of the submit button from 'Form Actions' and have added commit and Navigate to Page. Commit is first then Navigate to page. I am not passing any parameters in the redirect yet, for now it's just the url to the same aspx page.

It works fine, part of it though. When a user clicks on submit, it saves the data and redirects you to the same page but then I do not click on the submit button again. So in theory it should create only one entry in the list. The problem is that it is creating 2 entries in the list, though I have not clicked the button a second time. This is somehow random. Sometimes, it creates one entry(as expected) but most of the time it creates two entries. (Never more than 2 entries).

I spent hours on this but could

View Complete Post

More Related Resource Links

How to add custom list entries to mysite's calendar in Sharepoint 2007 site?


I would like to know below things

(1) How to create MySite for one specific member with other or administrator's access?

(2) Scenario : Administrator have created one SP2007 site. now Administrator have created one calendar (Sample calendar). Administrator have added some entries in calendar. now one user entered in portal site ansd view the calendar and he click on MySite menu. so this sample calendar entries should enter in that user's mysite calendar. How this can be achieved?

Thanks in advance.
Regards, Praful Udade

Disregarding updates on non-checked-in entries in a sharepoint list (SPAudit)


Hey guys.

Okay, this is a little hard to explain, as the title might suggest.

I have an event receiver on ItemUpdated and ItemCheckedIn, which both writes custom SPAuditEntries. When CheckedIn occurs though - it comes with two update entries as well (one for added file, and one for a simple update to the list item I suspect).

I'd love to get rid of these entries. At first I thought it would be really simple, just put an if in the itemUpdated event receiver, and stop everything

if(SPListItem.CheckedOut = false) { //... do nothing }

However I couldn't find any way to ascertain the checkout-status of the listitem. My next thinking was, they hit almost at exactly the same time, so I could just crawl into the auditCollection, filter down to the specific listitem, user, and time (minus a second) and delete the two entries. But, sadly I found out I couldn't delete auditentries.

Anyone got any ideas?

ListItem Dynamic DropDownList based on custom list entries.

I utilized the following solution to get the drop down list on the page and populate it dynamically, but it doesn't save the selected value back to the SPListItem object. Does anyone have a better solution possibly for this? http://geekswithblogs.net/SoYouKnow/archive/2010/01/21/sharepoint-populating-drop-down-list-field-with-data-from-different.aspx

Submitting InfoPath data to a SharePoint 2007 List

Clayton, i sure hope you get this.  I would like to let the form get published to the form library and then workflow can create the new list item with all the required metadata mapped.  if data is updated i would like for the list item data to update as well.  currently i have an infopath form that is web-enabled.  i several views based on a status field as which view to open to.  this form have drop-down fields linked to list already on the sharepoint site.  i have tried using the "Submitting Data from Infopath 2007 to Sharepoint List" and it works as designed but unfortunately i cant customize the fields.  i need a dynamic user friendly form with drop downs etc.  any suggestions?

Infopath Form Data submitting to Sharepoint 2010 List

Making a Client intake form that once submitted will send data to  a sharepoint 2010 List called contacts. Short Summary the form will have repeating fields and alot of information to submit. I have looked and read all over but I cannot find an easy step by step guild on how to submit the form data like that. Long Summary on the sharepoint site a button will open a form for adding a new client.  once the form has been filled out and the user hits submit sharepoint will then create a User File, in clients file, and take the data and put it into contacts list. I am trying to make use of Sharepoint as I would with access, meaning the more information I have on a client the easier it will be to mail merge letters, motions, basicly any file prepaired stuff. So once I have css designed forsharepoint to make it look the way I want then the forms should intergrate perfect

Seven entries per change in daily alert on a custom list


I have an alert on a custom list with "All changes", "Any changes" and "Send a daily summary" set.  In the daily email, each change entry is repeated 7 times.  I only have one active alert (if I had multiple, I'd likely get 7 email messages, not one with duplicate entries).

The version number of the item is consistent with only one change being made.  The SharePoint version is reported as  I don't have admin or physical access to this installation and can not see if there are any unusual features installed.

Duplicate Fields during list creation from content types and site columns


I am trying to create a List in Sharepoint 2010 using Site Columns and Content Types. It results in creating duplicate fields in the list for the Site Columns used. Here is the details description of what I was doing.

I have created two site columns 


<Field Type="Number" DisplayName="Start Coordinate" Required="TRUE" EnforceUniqueValues="FALSE" Indexed="FALSE"
Group="QMS" ID="{A3F2D108-11B5-4B49-9633-338D27227E12}"
Name="StartCoordinate" Overwrite="TRUE" />

<Field Type="Number" DisplayName="End Coordinate" Required="TRUE" EnforceUniqueValues="FALSE" Indexed="FALSE"
Group="QMS" ID="{06B927BB-C354-4A0A-AE88-9C14E55EAB27}"
Name="EndCoordinate" Overwrite="TRUE" />

Then added these to a new content type I

Duplicate user entries in aspnet_Users table


 I'm using SqlMembershipProvider and SqlRoleProvider for user management.

Users are created by

Dim MCS As System.Web.Security.MembershipCreateStatus

Dim NewUser As MembershipUser = Membership.CreateUser(TB_UserName.Text, TB_Pw.Text, TB_Email.Text, TB_SecQuestion.Text, TB_SecAnswer.Text, False, MCS)

later, after email confirmation, I take the user into a specified role

Dim myUser As System.Web.Security.MembershipUser = Nothing

Workflow History list - Huge number of entries.


Hi there,

Does anyone know if there is an issue with having a large number of entries in the workflow history list. I've got 2 sites that have only been in existence for 9months and the workflow history lists are already at 14000 entries?

Is this list size an issue?

Would growing at this rate cause an issue in the future?

Is there anything we could do about it? settings, delete routines..

Any ideas/suggestions gratefully received!



Submitting data from Infopath 2010 to a Sharepoint 2010 list fail


Hello everybody,

I'm trying to submit data from an Infopath 2010 form to a Sharepoint list using the following tutorial: http://msdn.microsoft.com/en-us/library/cc162745(office.12).aspx 

However this doesn't work. The form creates new entries but when you whant to change or delete an entry, I get the following error: Object reference not set to an instance to an object. Any idea what is wrong with the code?

using Microsoft.Office.InfoPath;
using System;
using System.Windows.Forms;
using System.Xml;
using System.Xml.XPath;
using mshtml;

namespace Sharepointupdate
  public partial class FormCode
    // Membervariablen werden in browserfähigen Formularen nicht unterstützt.
    // Schreiben und lesen Sie diese Werte stattdessen aus dem FormState-
    // Wörterbuch, indem Sie Code wie folgt verwenden:
    // private object _memberVariable
    // {
    //   get
    //   {
    //     return FormState["_memberVariable"];
    //   }
    //   set
    //   {
    //     FormState["_memberVariable"] = value;
    //   }
    // }

    // HINWEIS: Das folgende Verfahren ist für Microsoft InfoPath erforderlich.
    // Es kann 

Prevent duplicate values to be entered into list


Hi, my scenario is that I got a list of Candidate details, This list i edited in Infopath 2010 and created a user interface, I am filling the candidate details list through this interface,

my problem is that I dont want to enter duplicate values to be entered into the list, i want to show a message in the form that when ever duplicate values are entered I watn to show a message

normally it is easy to prevent this by using workflow, but i dont understand how can i do this with the form,

is there any way that once i run the workflow i can pass the value to the form and check there and show a message


Finding listBox Duplicate Entries?


Hello all.

I have a List Box filled with entries from a recursive function that searches for files

The list Box displays whole directories of all files.


How can I find duplicate file names Only...without deletion of course.

give me code if possible

I use VC++



Submitting data to a lookup field in a SharePoint list


I'm trying to submit values to a SharePoint list that contains text fields and lookup fields.  I'm doing this with a WebServiceConnection and an XML file.  When I execute the submit without the lookup field, it works perfectly.  When I execute the submit with the lookup field it doesn't error out but my list is not updated.  Can anyone help?

How to delete duplicate entries from my table


What I mean by duplicate is when

charField=charField and timestamp=timestamp for two or more records. 

So, how do I eliminate these records?

I would prefer to keep the one which has the lowest number in a third field (Score) if that is possible.

Ready made List Types provided by SharePoint

SharePoint provides some out of the box List Types. Some of the most used ready made list types that SharePoint provides currently are listed below:

Export SharePoint List to Excel Spreadsheet Programmatically using C#

In SharePoint applications, Custom Lists are used to store business data and Document Libraries to store the documents. But for data manupulation and analysis, Microsoft Excel provides very rich features as compared to SharePoint Lists. That's why people still loves to work on Microsoft Excel Sheets.

Dropdown list in ASP.NET - How to get value selected

am sure this must be very simple, but unforunately I can't figure it out.
I have the following code which populates the dropdown lists from the database. This works fine. Now, when the user selects a particular employee name from the list, I want to get the Employee Id of the selected employee. i.e. I need to get the "Eid" value. I can do this if the EId is loaded in the dropdown list, but in this case only the employee name is displayed. Please let me know howI can get the Eid value even though it is not loaded in the dropdown list.
I would really appreciate your help
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend