Solved

Edit "New Item" page

Posted on 2013-01-29
5
277 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

Summary In SharePoint 2010 it is easy to create custom color themes to jazz up a site. Theme colors can also be created in PowerPoint 2010 with a few clicks. But how do the chosen colors actually look in the SharePoint site? The attached PowerPoint…
We had a requirement to extract data from a SharePoint 2010 Customer List into a CSV file and then place the CSV file into a directory on the network so that the file could be consumed by an AS400 system. I will share in Part 1 how to Extract the Da…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

820 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