New answers tagged

2

Instead of SPList you should use SPPictureLibrary. I mean SPList picLibCity = (SPPictureLibrary) spWeb.Lists["City"]; And instead of ImageURL, you should use ServerUrl. I mean foreach (var row in EmpList) { if (row.City!= null) { string group = row.city; SPItem lookupItem = picLibCity.GetItemById(group.LookupId); string ...


1

I can think of three ways in which this code has gone wrong. The long URL that you are mentioning is actually a view inside a site collection which is not the root site collection. Meaning that you are trying to access a the root site collection instead of the actual site collection. The easiest way of knowing this would be to check if there is a "sites" ...


1

Do I have to call executeQueryAsync twice? Once to get the list items and the 2nd to act on all of them? Yes. Your first query gets the list of items (declare them in the parent scope, obviously, so that they are accessible on the success callback), and in the function of success callback, you can iterate through them to fire individual queries to modify ...


1

You can delete it with the help of SharePoint Designer Open site Goto All files Select list folder Select your list There you'll have the view page Delete the page And voila you are done.


0

You can delete the List View using following PowerShell script. function Remove-SPListView { Param( [string]$WebUrl, [string]$ListName, [string]$ViewName ) Start-SPAssignment -Global $SPWeb = Get-SPWeb $WebUrl $List = $SPWeb.Lists[$ListName] $View = $List.Views[$ViewName] $List.Views.Delete($View.ID) ...


0

It should still be able to add, remove, and edit list views using SharePoint Designer, even if for some reason they don't show up in your views. You just go to the site, open the list in question, and right there you should see everything in the back-end folder that SharePoint leaves aside for list views. This post talks about how to add and edit them rather ...


2

I don't think there's a way to tell the edit form to automatically open the first item per se, but if you had the time you could create a page with a PageViewer web part that links to the edit form and then write some JavaScript code to look up the list through the CSOM, determine what the lowest ID is, and then replace the ID portion of the query string ...


0

For the sake of having a real answer to this question let me rephrase your last comment and add one answer here. If you want to show a sum, count, average on the list view you should use list aggregations in the view settings as shown on the screenshot. If you want to achieve the same on the NewForm.aspx you will have to add a content editor webpart and ...


0

https://github.com/purtuga/SPImages has an .ASPX page you drop into a Library which lets you browse all the SharePoint default images


1

The icon URL is: http://your-sharepoint-url/_layouts/15/images/ For example: http://your-sharepoint-url/_layouts/15/images/icdocx.png


1

By using code from How to build a CAML query with several nested OR's using a loop and its answser http://sharepoint.stackexchange.com/a/167266/35604, you can easily simplify your code. Now you have all these methods that help you building nested Or and And queries, simply do this: List<string> queries = new List<string>(); if ...


0

There is no good solutions to this, other than creating a string and appending subqueries underneath. I faced this a few years back, and ended up with appending subqueries to a big query. Though, you should go away with all the combinations. Instead having something like this : List<string>partCollection = new List<string>(); if ...


1

For us it was some columns are indexed twice. So we created index for: Column A, Column B, Column A + B By removing the third index we solved this issue. Pretty hard to understand why Ms even allow the combination in this case.


0

Debugging causes these errors to throw. Do E in PF12 and select the "Never break on Exceptions" option. Problem goes away!


2

Without fully knowing your list data structure, I'm thinking your query string should be formatted along the lines of : <Where> <Or> <Contains> <FieldRef Name='SeriousHarmQ1' /> <Value Type='MultiChoice'>Loss of consciousness</Value> </Contains> ...


2

To add only like feature, It is needed to add two site columns in the list. Site columns are: LikesCount which GUID ID is 6e4d832b-f610-41a8-b3e0-239608efda41 LikedBy which GUID ID is 2cdcd5eb-846d-4f4d-9aaf-73e8e73c7312 Following is the code using(ClientContext clientContext = new ClientContext(targetSite)) { clientContext.Credentials = ...


1

This can be done using a Designer WF and REST. The hard part is going to be if you need to allow multiple users to have access. Basically, you will need to add a field to your forms that you can enter the users. A people picker or text field will do. The text field can make it more likely that mistakes will occur, but I think will be easier to parse out ...


0

Is it a custom list and any workflow associated? This is mostly likely a permission issue, verify the permission on the list.


0

Add the below code to a content editor web part on the page. Change the list title in the code. If you run into any issues, check the dev tools to make sure you are grabbing the correct properties while finding the jQuery header elements. <script type="text/javascript" src="//code.jquery.com/jquery-1.11.1.min.js"></script> <script ...


1

If you want to show the total number of items shown in a pie chart you can use the DataTable class's getNumberOfRows() method to get the number and then display this number somewhere on the page next to the pie chart. See reference here: https://developers.google.com/chart/interactive/docs/reference#DataTable If what you meant is you want each slice on ...


1

through powershell or c-sharp code


0

Just create a page and add a List view web part - in 2013 this is just insert -> Web Part -> select library. You can customize the view on this page and then set permissions to this page. Don't use audience targeting as mentioned above as this isn't security. SharePoint is security trimmed, so if you add the page to the quick launch, if a user doesn't have ...


0

You can go through all that trouble or you could just add the Site Column called "Contact Photo". This site column displays the picture and is synchronized with Outlook if the list is synchronized with outlook. To make this a better solution, you would customize the column with JSLink to allow uploading the image and saving it as an attachment to the list ...


0

Personally, I would export the list as a .cmp file and import to all locations you wish to provision it. See this Technet article for more information.


1

Each SharePoint site collection has list galleries. You can upload a list template into the gallery and it will become available on all sub sites. To do that, first create the list. Then open list settings and select "Save list as template". Choose to not include content. This will create the list template in the gallery. Now you can go to any of the sub ...


1

If users are required to authenticate then it would be the "username" probably email in case of sharepoint online or if they are not required to authenticate then it would be "Guest Contributor" in the modified field. more detail here and here


0

Option #1: Use jQuery/Javascript on DOM ready SharePoint creates two text fields for the URL field type, you'd need to set the value for the second matching element using javascript. Here's an example using jQuery: $(document).ready(function() { //Note: id selector below needs to be the internal name //Use Firebug or IE tools to see how id(s) are ...


1

I would try adding a calculated field on the Product list, and use it to build a link to the Order one. Let's start from the url. "http://someSite:somePort/Lists/Order/AllItems.aspx?View={ViewId}&FilterField1={ProductFieldName}&FilterValue1={ProductValue}" By using a query string like the one above you can create an url that will link to the ...


1

String myURL = "<your site URL>/_vti_bin/owssvr.dll?Cmd=Display&List={List GUID}&XMLDATA=TRUE"; HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(myURL); myRequest.Credentials = CredentialCache.DefaultCredentials; HttpWebResponse myResponse = (HttpWebResponse)myRequest.GetResponse(); Encoding enc = ...


0

This is most probably because you created the columns in your custom list using the grid view, correct? When you do this, SharePoint assigns these kinds of internal names to your columns, ym4b and rq0x etc. Your 'new' API call is returning with the internal names of the columns. Your 'old' API call is returning with neither the display nor the internal ...


0

Those are the type of randomized names SharePoint generates when you create columns using the "Add Column" button in the "Edit this list" view. You see this differently in the new _api endpoint than in listData.svc because the _api endpoints use internal names and listData.svc endpoints use display names for the JSON data member names. You can avoid these ...


0

A Microsoft SharePoint Server 2010 farm-level feature called SocialRibbonControl causes the I Like It and Tags & Notes controls to be displayed on the Documents and Items tabs of the ribbon for document libraries and lists, as well as on all browse pages. These controls enable users to tag and rate items and to leave notes on Web pages, including the ...


1

If coding is option, Then you can create a timer job or console application and then schedule it to run daily. It will check whether today is review date and update the status accordingly. The code will be something like below using (SPSite site = new SPSite("Your site URL")) { using (SPWeb myweb = site.OpenWeb()) { SPList olist = ...


1

Using a workflow, you can set an action to Pause Until Date. In the date field, use your Review Date or a variable that is set to Review Date. Basic workflow logic: Pause Until Review Date If Review Status = New Set Review Status = Review Needed Little more info on the topic: "Pause until Date" workflows unable to handle changing ...


1

Reflector shows us that EnableAssignToEmail is not decorated with the ClientCallable attribute, thus is not accessible via CSOM.


1

With Workflows you can use Create List Item and Update List Item actions so that whenever a user adds a value for Blue the amount will be added in another list's column which contains the previous amounts already.


0

Using Powershall Script , change list URL. Add-PSSnapin Microsoft.SharePoint.PowerShell –erroraction SilentlyContinue $libOriginalUrl = "/Lists/YourLibName1"; $libNewUrl = "/YourLibName2"; $web = Get-SPWeb -Identity http://.... $lib = $web.GetList($web.Url + $libOriginalUrl) $rootFolder = $lib.RootFolder; $rootFolder.MoveTo($web.Url + $libNewUrl)


0

This behavior seems to be by design, it's supposed to work with alternate access mappings, but emails are clearly not considered. There's a function in SharePoint Rich Text Editor JavaScript that strips the domain, so if you switch to plain text, your HTML source will not be modified. See this Q&A as well Absolute URLs converted to Relative URLs when ...


2

Even I have the same requirement. But Unfortunately we don't have any option like enforcing unique by combining 2 columns by default. Even I have researched a lot. But we can achieve this by using only info-path form. Hope the below link may help you ...


0

Thanks for the help, I found the problem with the script: var listItemEnumerator = itms.getEnumerator(); item was needed to replace itms


1

It turns out that the "Created By" field in SharePoint is a lookup column and can display/show a number of different values about the account. If you open the column to edit it, there is a property named "Show Field". In our case, someone had changed this to "Created", which refers to the date the account was created in the user information list. That is why ...


1

I used JSLink in the listview to retrieve this field, which comes back in the context object as an array. I then use the length property to render the count to the field I want. Note that this is only good for view purposes as JS link does not actually update the value of the field itself, unless you explicitly write code to do so. Steps are: Create a js ...


1

Did you follow the below step(see image) mentioned in the article, https://blogs.technet.microsoft.com/tothesharepoint/2013/09/06/how-to-display-values-from-custom-managed-properties-in-search-results-option-1/


2

They are all on virtual folders, that are really located in the database. You need to download and install SharePoint Designer, and then you can view, manage, and create any content you need. Seeing that you are a developer, this is really something you could use in your toolset. You can download the SharePoint Designer 2007 package here.


0

The View created needs to be modified and include Type in the column name. Steps to be follwed: Go to AllItems.aspx page. On the ribbon ..click on Modify this View....Select Type under the listed column and select Ok. You should see the folder on Allitems.aspx page now. Hope I got your answer right.


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 !


0

You can create a New Item workflow that will set the field Type to the value of Content Type when the item is initially created.


0

Check your permission within List... Are you having full control within the list as well


1

Found a simple solution to get around this problem. Go to "List Settings", create a new view based on the current (problematic) view. Make that view default. Now in your newly created view, you wont see the view title on top. Delete the old view and you are done.



Top 50 recent answers are included