Hot answers tagged

12

Go to Advanced Settings and Enable the Allow management of content types. Now you will see the content types associated with the list under the Settings section. Click on Item. Select the column. Check the Required radio button.


11

It depends on a few basic factors that need to be answered first: Will you use the same term store metadata anywhere else in the farm? You could have project numbers or contacts associated with other site collection in other applications. Maybe not at the moment, but in the future there may be a need. Consider this scenario as you make the decision. Would ...


10

If you want the delta values displayed in a View like this: You must create a View that Groups by Room and sorts by Date A Calculated Column 'ChangeMonitor' with Formula set to datatype=Number to output HTML/JS can then use JavaScript code to calculate, display and color the deltas Copy/paste this Formula to your Calculated Column Formula: ...


9

Use below code to get User name: new SPFieldLookupValue(properties.ListItem["Staff Member"].ToString()).LookupValue; For User ID: new SPFieldLookupValue(properties.ListItem["Staff Member"].ToString()).LookupId;


8

There is a property on the list for the default dispform, newform and editform url. Example: var clientContext = SP.ClientContext.get_current(); var list = clientContext.get_web().get_lists().getByTitle("ListTitle"); var caml = new SP.CamlQuery(); caml.set_viewXml("<View />"); var listItemCollection = list.getItems(caml); clientContext.load(list, ...


6

There can be many advantages if you target your users to the Web Part Page on which you have a view of a List. And they are as follows. The independent Web Part Page can be branded and have a more appealing look Instead of showing all of the items, Views are very useful in listing the filtered data. Which makes sense when you want your users to see only ...


6

Make sure that the column you include in the where clause is defined as an indexed column in SharePoint. You can check by going to the list you're querying and into List -> Settings -> Indexed Columns. It's not applicable in your CAML query, but if you have more than one 'where', ensuring the first where hits an indexed column can increase efficiency. ...


6

The client wants to actually display 20,000 items on a single page, without paging? I cannot imagine a valid use case for this. No one is going to read 20,000 items. Tell them it's not possible. Then try to find out what they actually need and see if there is a solution. If they push back and insist on giving the users the capability to scroll through 20,000 ...


5

Deploy your feature to Web Scope and enable the feature on your subsite. Register the event receiver (element.xml) with: <Receivers ListUrl="Lists/test">


5

To brief it is actually a good practice to refer on a different page with list view web part added onto it. Reason is you can configure the new page such that user will not be able to use ribbon options (if want to restrict from navigating through list settings) Step to hide ribbon: Edit your webpart Select Toolbar Type to None Chrome Type to Border Only ...


5

Edit the page > edit the list web part settings by checking the checkbox and select "edit webpart" from the dropdown menu. Look under the tab "miscellaneous", there should be a checkbox to toggle show/hide for the list search box. Or if you are using a different style for the list view, that might be the problem as some of the styles are pure OOTB ...


5

Lookup columns can only be based on 'Single line of text', 'Number' or 'Date and time' columns see Create list relationships by using unique and lookup columns So your only option would be to create a 'Single line of text' column and have an event receiver or workflow populate this with the wanted information from the person in the owner field.


5

Definitely REST. SharePoint is moving more into the REST world with each update. It's how O365 is being geared. In fact MVP SympMarc (http://sympmarc.com/) who wrote SPServices (for javascript) now has a presentation on how to move from SPServices to REST services. So definitely go with REST.


5

As Steven stated there is no way to do this OOTB but you can do it with powershell. Get the lists from different Sites: $targetWeb = Get-SPWeb http://sitecollection/site1/ $sourceWeb = Get-SPWeb http://sitecollection/site2/ $targetList = $targetWeb.Lists.item("Target List Name") $sourceList = $sourceWeb.Lists.item("Source List Name") Add the Lookup field ...


5

Lists columns have this functionality built in. Simply enable the enforce unique values option on your desired column. Then you try to add your item like normal in your JavaScript code. Any error you will receive in the callback and you can handle however you'd like at that point. Let the built in SharePoint functionality work for you.


5

Suffix wildcard matching is supported in SharePoint. You can use "Smit*" but not "*mith".


5

That is because you are not calling the REST api "/_api/web/lists/getByTitle('MyList')", the url you are calling returns the the ListView (AllItems.aspx) page. Change the url to _spPageContextInfo.webAbsoluteUrl + '/_api/web/lists/getByTitle("MyList")/items'


5

I would suggest Managed metadata.. Increase in list may lead to threshold limit issue. Have look at this article stating pros and cons : MSDN Added benefit to MMS is you can create labels to terms, so it will be convenient for users to type in abbreviations or alternate keywords. Also security can be handled over here.If want users to update or add new ...


5

Yes and yes. You can hide the columns on the forms by adding custom action to each of the forms like this: <CustomAction Id="Project.DisplayForm" Location="DisplayFormToolbar" ControlAssembly="$SharePoint.Project.AssemblyFullName$" ControlClass="Project.ProjectListFormCustomActions" ...


4

What you could to is just create a OOTB custom list, change the Title field to "New Idea" or something relevant and then enable ratings for the list from List Settings > Rating Settings. Enable it to Yes and select Star ratings and voila! Users can now rate the item/idea on a scale of 1-5 stars. If you wanna take it further from there, you could set up a ...


4

Seems to me you have not a complete understanding of the logic you are trying to write? Let me give you an example of how your code works now: You have items 1 2 3 4 5 6 7 8 9 10 You retrieve them backwards (say you set RowLimit=5 for now) so you will get: 10 9 8 7 6 Then you save the 6 in a variable When the user click on "Show more" or whatever, ...


4

It would look like this (from memory): var camlQuery = new SP.CamlQuery(); var textCAML = "<View><Query><Where><Eq><FieldRef Name='Author' LookupId='TRUE'/><Value Type='Integer'><UserID/></Value></Eq></Where></Query></View>"; camlQuery.set_viewXml(textCAML);


4

Disabling this option means that SharePoint will not crawl the items in the list and they will not come up in a general search, as you say. In my experience, it does impact searching within the list, as well. The search box at the top of the list will still be visible, but if you enter a keyword and hit enter, you will receive the message "Your search ...


4

Trick is to attach a JavaScript keyup event to the existing Searchbox for every ListItem (in this case above the Searchbox in the DOM, because events bubble up anyway) Each script can check against any content you can reference in a Calculated Column... that means no enumerables like Person fields or Multiple Select Choices. If you stuff it all in a ...


4

You should always select your list based on the URL, as the Title is more likely to change. And don't do SPWeb.Lists as this will enumerate all lists on the web site. Use this similar snippet instead: public Guid? GetListId(string siteUrl, string listUrl) { using (var currentSite = new SPSite(siteUrl)) { using (var currentWeb = ...


4

I would use the JavaScript approach. The CSOM/Javascript approach gives you much more coverage to the entire SharePoint API than REST. You still need to use Javascript to implement your REST request anyway. http://www.slideshare.net/mrackley/sharepoint-rest-vs-csom


4

How you can do this: Open your list and open the list settings Select the column "Plan start date" Under Validation setting type in the below formula : [Plan start date]<=[Plan end date] This help you to validate your dates before saving them. Hope this helps !


4

Remove the () after the success method name in the createDelegate function: Use clientContext.executeQueryAsync( Function.createDelegate(this, this.onQuerySucceeded_GetData), Function.createDelegate(this, this.onQueryFailedUpdate) ); instead of clientContext.executeQueryAsync( Function.createDelegate(this, this.onQuerySucceeded_GetData()), ...


4

A web part page with a list web part on it is actually exactly the same as "the list itself". When you say "the list itself", THAT is a web part page with a list view web part on it. Nothing more. So if you want to direct your users to a list called "My List", you can direct them to the default AllItems.aspx page for the list, or you can direct them to a ...


4

In the Web Part properties Change current view Uncheck the column title linked to item or title linked to edit menu Select title, it would just say title No need for SPD or any customization.



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