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: ...


7

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 ...


7

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

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 ...


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. ...


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

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

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

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


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

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.


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

If you're dealing with that many objects, I would create the term store and use the managed metadata fields. The reason is that once you get past more than 10 items, the lookup field gets a little unwieldy for anyone that uses it. If you use a managed metadata field, you can organize those values within your taxonomy and have a little more structure to the ...


4

Sometime we also face this kind of issue. If crawl is completed and we add new users they will not able to search the items. So after adding users we perform crawl once again. This resolves issue for us.


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.


4

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 ...


4

This is because Date is by default shown in Friendly format. One quick workaround you can do is to go to List Settings--> Click on Modified --> Change Display Format to Standard . Then dates will be displayed as mm/dd/yyyy format:


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

No. A list is always presented in the same way, using the same web part either if you go to the original list location or add it somewhere else. The only difference there is for your web part page is that the list web part toolbar type has been set to No Toolbar. If you choose to edit the page and then edit the list web part, you can change the setting ...


4

Go to List tab>List Settings>Validation Settings. Enter =(sum([Event 1],[Event 2],[Event 3]))<=8 in the Formula box. Enter some error text in the User Message box. Now if a user tries to save, and the total tickets is more than 8, it will show the error message, and not submit the form until it is corrected.


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

The Number trick to display HTML only works in Views, it shows the bare HTML on Forms and in Alerts. Full explanation and pros & cons at: http://viewmaster365.com/index.html#/How For Forms you have to go for Client-Side-Rendering (CSR) BTW Your Formula: =IF(Area="HR" ;"<div><img style='float: left' ...


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

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 ...



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