Solved

Edit "New Item" page

Posted on 2013-01-29
5
243 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:teylyn
Comment Utility
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
Comment Utility
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
Comment Utility
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:teylyn
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Work Over Net is a new and very powerful collaboration product. With its new easy interface it is becoming very competitive to other similar products like webex and office interactive. WON 2010 have the standard business tools needed for multi-offic…
SharePoint Designer 2010 has tools and commands to do everything that can be done with web parts in the browser, and then some – except uploading a web part straight into a page that is edited in SPD. So, can it be done? Scenario For a recent pr…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 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

7 Experts available now in Live!

Get 1:1 Help Now