Solved

Edit "New Item" page

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

The Scenario: Let’s say you have a quote worksheet in Excel that you use to work up sales figures and such for your clients. You utilize SharePoint to manage and keep track of these documents. You would like values from your worksheet to populate Sh…
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…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

895 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now