Solved

Edit "New Item" page

Posted on 2013-01-29
5
268 Views
Last Modified: 2013-03-07
Hello, I am very new to sharepoint, but here is my problem: I have a table that some users can insert records into. To do this, they open a page that has all the fields needed for that table and the INSERT statement is done automaticaly. I need to do it myself, with a stored procedure, or a pre-set sql command (mainly to check whether the record already exists in table with those informations).

Is it possible to be done without any third-party applications?

Thanks in advance
0
Comment
Question by:toddinho
  • 2
  • 2
5 Comments
 
LVL 50

Expert Comment

by:Ingeborg Hawighorst
ID: 38832997
Hello,

you don't need custom code or mess around with SQL. Just define the required columns to have unique values only. In the list settings, click on a column and set the choice for "enforce unique values" to "yes".

cheers, teylyn
0
 

Author Comment

by:toddinho
ID: 38833039
The problem is I need to check the existance of a record based on multiple fields, not just one... Is that possible without having to alter the table itself (some queries with * would be impacted)??
0
 
LVL 9

Expert Comment

by:BobHavertyComh
ID: 38833279
Can't you just enforce unique values on all of the columns in question? If so, you wouldn't need to check if this record already exists because it won't let you create one like it if it already exists.
0
 
LVL 50

Expert Comment

by:Ingeborg Hawighorst
ID: 38833671
Looks like the combination of several fields needs to be unique, not just several fields unique separately.

How about creating a calculated column that concatenates all the key fields. Then, using InfoPath to edit the list form, use a rule that checks if the combination of key fields in the new item already exists.
0
 
LVL 9

Accepted Solution

by:
BobHavertyComh earned 500 total points
ID: 38839776
I believe that if all of the fields in question (not all fields) are all set to enforce unique values, it would be impossible for that combination of values to be repeated and it would not let you enter a new record when the same exact information already exists in a existing row (or record). Therefore, there would be no need to check if it is already there because it's impossible to make a duplicate entry where all of the unique value fields are the same value as another record that already exists. So by making multiple columns enforce unique values, you are doing the same number of checks to see if this already exists in this same combination of values that the user is trying to enter.
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Sharepoint List View 6 33
Summing up list items in SharePoint online and a bit more 5 57
InfoPath Business days 1 61
VBA in SharePoint 3 46
I recently came across an issue with a MOSS 2007 deployment where access into some sub-sites were denied, even for the MOSS farm administrators. A bit of background to the setup of this MOSS farm; this was a three server setup, consisting of a fr…
Pimping Sharepoint 2007 without Server-Side Code Part 1 One of my biggest frustrations with Sharepoint 2007 in the corporate world is that while good-intentioned managers lock down the more interesting capabilities of Sharepoint programming in…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question