Sharepoint Custom List Duplicate elimination - sharepoint-2007

I have custom list in sharepoint and I am doing validation through sharepoint designer using Jquery. My requirement is I want to access list items from sharepoint in the client side before I can enter new data.
Is there anyway I can access custom list items before I can push new list items in to the custom list.
If I can access then I will make sure no duplicates are being entered into the list.
Could anyone help this.. Or could any one suggest any other approach to fulfill my requirement.
Hari

There is a jQuery plugin for accessing SharePoint list data. You could use this to retrieve items and compare them. This will not be very fast as the number of list items grows.
Alternatively you can write an Event Handler and attach it to the list. With this, you can attach to a list's OnAdding call. You can examine the list for duplicates and set the cancel flag on the operation if the item would cause a duplicate. This would take longer to build and customize your list but might be the better approach.
Lists expose OnAdding OnAdded OnUpdating OnUpdated OnDeleting OnDeleted. When they are fired is obvious. The 'ing' functions are fired as the operation is in progress and you can stop the event from succeeding. The 'ed' functions are fired after the completion of the activity.

Related

Umbraco 8 - hide Member Groups

Can anyone advise if and how I can hide the Member Groups folder within Members in Umbraco 8 for a specific user group?
Failing that, can I give users access to the members section but prevent member group deletion?
thanks
From an API point of view this can be done now with events so it would be up to you at a granular level to decide what rules are applied to hide properties. You can subscribe to the event EditorModelEventManager.SendingContentModel and modify the outgoing model which means you can add/remove tabs/properties, and pretty much whatever you want. If you wanted to pursue that without modifying the core It would also be possible to create a package to have some UI to control these rules if you wanted.

List of all the event using organiser_list_events which are live only

I am using organizer_list_events API method to list the event. It is returning the list of all the future events which has status of "Draft" as well as "live", is there a way to filter the list to show only "live" events only using APImethod?
https://www.eventbrite.com/json/organizer_list_events?app_key=myappkey&user_key=myuserkey&keywords=mykeywrd&display=repeat_schedule&id=myid"
Any suggestion would be appreciated....
While you can pull your events by specific statuses ("Live", "Started", "Ended"), you can't pull a list of events that are only in 'Draft'.
When you pull a full list of events, your draft events will be included -- so you could filter on your side.
Sorry for the inconvenience, I'll definitely add this use-case to our product request queue.
Though I know that it is quite possible to segregate the list based of the status of the events, once we have a list pulled up using the API method.
It would have been great functionality to have a parameters during the API method call to have a status also. This would make the work of API functionality more easier.
Thanks

TFS 2012 Add custom Dictionary

We're about to implement TFS 2012 and I've been having some fun customizing some work items to aid us in our reporting. One issue we have is our reporting based on clients.
Our Product Backlog Items keep our requirements, however, we need to report our requirements per client (government regulations). Some requirements will affect all clients, some will only reflect certain ones. I've been able to add a global list of clients along with a multi-select option and that part is working great.
The issue is we need to also note the requirement number for each selected client. I know I can go in and add a field for each 'Client Requirement', but as that list gets bigger, that screen will be insanely huge.
Does anybody know of such a way to implement something of the sort?
One option would be to create a custom Work Item Type for Clients. Then link your PBI's to the appropriate client WI's. When you create a link you can enter a link comment also which you could use to capture the client-specific requirement number.
I would create a custom "Client Requirement" work item that has the list of clients to select and includes a field for Client ID. You can then either use the related link type or create your own, maybe "Implements \ Implemented By" so that you can create a Reporting Services report that pulls the ID's

Is it possible to display a read only field on a work time that references a field from a parent work item?

I am using the TFS 2010 Scrum template and want to modify the Task work item template so that I can display the PBI's backlog priority (read only).
I am familiar with editing the process templates, but not sure I can setup a field to pull data from another work item
There are no rules available to get data from other work items. If you want to do this, you can either use the eventing service (which is a service that is invoked on work item save for example) or you can create a custom work item control.

How should I obtain complete list contents after a post?

using asp.net mvc, I'm initializing a list in the server code, and allowing the end-user to add to the list on the form (using JQuery to add entries). I know how to obtain a list's selected items on a post back, but I don't need to do that here. I want the complete contents of the list accessible in the server code after a post back.
Is a posted list just not going to give me the full content? Should I use Ajax to send each item to the server as each items gets added to the list?
thanks
There are a couple of ways that I can think of doing this.
make an ajax call each time an item is added - as you suggested
when an item is added to the list, you also add a hidden field to the form that will be submitted. Then on post back (although that terminology is very Web Forms-y), in your action method, you'll have access to the contents of the list. If you name things correctly you should be able to model bind to a List.
The latter would be my preference, it depends on your particular situation though.
Some things to keep in mind:
Bandwidth from the user to the web server is very small compared to bandwidth from a database to the web server
The database most likely cached whatever query you just ran to populate that list
It sounds like you're asking for the entire list to be included with the postback data, and that means having the browser upload that data for the user.
With all that in mind, it should be obvious that you're better off rebuilding your base list from the database.

Resources