Hot answers tagged

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


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

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

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

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;


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

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

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

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

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

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

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

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

Just wanted to add on to Kaylee's answer and user22005's comment. To open the new item form in a pop up, we can use the following code snippet: <form> <input type="button" value="Button Text Goes Here" onclick= "javascript:SP.UI.ModalDialog.ShowPopupDialog('http://yoursite/yourlist/NewForm.aspx;);return false;"/> </form>


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

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

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

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


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

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

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

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

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.



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