Solved

Edit "New Item" page

Posted on 2013-01-29
5
296 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 50
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
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Microsoft SharePoint Foundation 2010 and Microsoft SharePoint Server 2010 do not offer the option to configure the location of the SharePoint diagnostic trace log files during installation.  This can, however, be configured through Central Administr…
A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

623 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