Tag Info

Hot answers tagged

3

Here is a script that gets the UniqueId of a list item: <script type="text/javascript"> $(document).ready(function() { ExecuteOrDelayUntilScriptLoaded( function() { var itemId = ....; // change to the real id var listTitle = .... // the list title var ctx = ...


3

Hello Michal: There is nothing out of the box that would offer that functionality. Indexes are unique on a per column-basis and each column index is independent. The ItemUpdating event receiver is the best place to do this. You could simply have the event receiver query the list to see if a duplicate record exists before the item is created or saved.


3

First add the List Item so its Id is generated, than get the item again... Update its Title field and concat Id column with it.. Pseudo-code below: ListItem newItem = lstObject.Items.Add(); newItem["Field"] = "something"; newItem.Update(); newItem = lstObject.Items.GetItemById(newItem.Id); newItem["Title"] = "YourText" + newItem.Id.ToString(); ...


2

Each question is essentially a column, you could ask the question in a different format. You have to tell yourself, if the questions aren't really identical in what it's asking, let's change the question. If the data being last year is what is unique, include that in the question. Otherwise you need to find a way to trick SharePoint to use the same format ...


2

Yes - you can use the file's GUID. Retrieve the GUID of an existing file using SPFile.UniqueId and open the file using SPSite.OpenFile(GUID).


1

You cannot do it without any use of code. I think the simplest solution to this is to use jQuery/JavaScript to make sure each answer is unique (on top of my head: each time a user select an answer i would save it in an array and then compare the next answer to the array - if there is a similar answer in the array then it’s not unique and i would show an ...


1

Are these documents stored in a document library? The list entry ID will never change, no matter how many times you change the name, meta data, etc. So you can always use a link such as http://sitecollection/library/forms/dispform.aspx?id={0} to show the "View Properties" screen for any file; there people can view the meta data and/or open the file.


1

You could use the Document ID Service that will uniquely identify a document. This will generate a unique identifier for the document and give it a distinct URL, from the referenced blog post, it'll look like, http://sitecollectionurl/_layouts/DocIdRedir.aspx?ID=MFSHF5F7ZUF5-1-1.



Only top voted, non community-wiki answers of a minimum length are eligible