Tag Info

New answers tagged

0

In that case you don't need to specify CamlQuery.FolderServerRelativeUrl property at all. The following example demonstrates how to retrieve items of top folder in List: var list = ctx.Web.Lists.GetByTitle(listTitle); var items = list.GetItems(new CamlQuery()); ctx.Load(items); ctx.ExecuteQuery(); If you are interested in returning only items associated ...


0

You just need this: SPQuery query = new SPQuery(); SPListItemCollection myItems = list.GetItems(query); By default you get the files under the root folder. Scopes in a CAML Query


0

I agree with the previous answers ! I have recently started using CSR to style both lists and some basic modifications to new / edit / display forms. Once you get going with it, there is quite a bit you can do. The links provided are excellent, I just wanted to add one of my own with a working script as I struggled to find examples that showed how to ...


0

I wonder if SharePoint's default client side rendering could be taking effect and rendering over your changes after you have applied them ? At a minimum it might make a difference if your CEWP is above or below the listview web part ? Also do you need to call jQuery(document).ready() ? eg. (I have not tested this...) <script type="text/javascript" ...


0

Workaround Create a calculated field which removes the . character from that field. Except the first dot. i.e 1,1.1,1.11,1.12 etc. Convert that to a number Sort on that field. You can hide that field from the view. Actual Field Calculated Field ------------ ---------------- 1 1 1.1 1.1 1.1.1 ...


1

You can add lookup columns to Site Collection parent site and have it reflect as lookup within child sites by creating the site column as lookup. But cross site collection, it is not possible OOTB. There are 3rd party solutions available if you search for "Sharepoint 2007 Cross Site lookup".


1

You can achieve this with what is called Client Side Rendering (CSR). These are the best articles I have come across on CSR and how to use it: SharePoint 2013 Client Side Rendering: List Views SharePoint 2013 Client Side Rendering: List Forms Note: Some people use the terms CSR and JSLink interchangeably, but they are NOT one and the same thing. CSR is a ...


0

Try this sample var call = $.ajax({ async: false, url: _spPageContextInfo.webAbsoluteUrl + "/_api/Web/Lists/GetByTitle('AppointmentInfo')/items" + "?$select=Id,Collaborators/Id, Collaborators/Title,Title" + "&$expand=Collaborators/Id", type: "GET", dataType: "json", headers: { Accept: ...


2

You should be able to do this using custom js link for the default list view, check out these sample it will direct you on how to implement it. Client-side rendering (JS Link) code samples There is an awesome post which describes the appraoaches for JS Link check out: SP 2013: Using the JSLink property to change the way your field or views are rendered in ...


0

I got answer. I create list in already existing list instead of myself creating new list. SPList thisTaskList = oSPWeb.Lists["MyTaskList"]; SPListItem tasks = thisTaskList.Items.Add(); tasks["Title"] = "New task" + DateTime.Now.ToString();; tasks.Update();


1

Its should be $select=Collaborators/Title&$expand=Collaborators Example your URL should like http://yoursite/_api/web/lists/GetByTitle('Employee Details')/items("1")?$select=ManagerName/Title,FirstName,LastName,Position,Phone,Fax,PreviousCompany,Reference,BirthDate,Relocate,EmailAddress&$expand=ManagerName


0

You can upload the MyTaskList in your list templates gallery at the root web and then try to run your code again.Before testing it in a timer job , you can create a console application and test the same.


0

Seems like "MyTaskList" list template is not included in the lstTemp. You need to debug and see if the line SPListTemplateCollection lstTemp = oSPsite.GetCustomListTemplates(oSPWeb); actually contains what you need. Can you also try oSPWeb.ListTemplates instead of oSPsite.GetCustomListTemplates()


0

You are getting the error because lstTemp might be null. Check if the object is null before getting a specific template by Name.


0

To get the custom list template collection, we have to use the RootWeb property of the site instead of specifying OpenWeb() method. Use the code below, SListTemplateCollection lstTemp = oSPsite.GetCustomListTemplates(oSPsite.RootWeb); Instead of below line SPListTemplateCollection lstTemp = oSPsite.GetCustomListTemplates(oSPWeb);


0

The best way I can think of to accomplish this OOTB would be to create another list rather than using a choice filter. This way the users would be saving the same item instead of it reloading every time the page loads. With this new list, create a choice field of the options you need like you would for the filter. Then create one item in that list. Use ...


0

You could save the choice filter selection into a cookie with javascript, then read it on every page visit and set the choice filter value accordingly


0

I had the same problems too. I resolved it in 3 steps I moved all the other normal site collections to a different content database using commands like this: Move-SPSite http://url/of/site_collection -DestinationDatabase contentDb2 -Verbose iisreset I Deleted the content database and then recreated it using the commands below: Remove-SPContentDatabase ...


0

This is not a bug. If you have more than one web part on a page then you must click the one you want the ribbon for.


1

This question is kind of off-topic. To implement this you need to use API's provided by Instagram Then using C# connect to there service end points and read the images etc. Now comes the on-topic part - You need to load this into SharePoint. For that you can refer following links ...


0

You can make use of QueryString. So in each link you can format it like http://siteurl/whateverpage.aspx?ItemId=14 Change 14 and dynamically place the Id. Now in your form you can read the query string (using JavaScript or Server Side) and process as required.


0

Unfortunately only SharePoint Online CSOM API (v.16) supports those properties currently for List object: List.MajorWithMinorVersionsLimit List.MajorVersionLimit In SharePoint On Premise, you could consider the following approach to return those properties: getListInfo('Documents', function (info) { console.log(info.MajorVersionLimit); ...


1

Yes, 0x00000000 means "no error". You'll find a definitive confirmation in the Open Specifications: If an operation completes successfully, the value of the ErrorCode MUST be set to 0x00000000. You'll find the meaning of other codes in the same article.


0

I'm not using Visual Studio, but when working with QuickParts and copying / moving documents between document libraries, the SourceID property on the field must be the same for the quick parts to persist. Try setting this property to something fixes - like the name of your project. Field schema reference at msdn.microsoft.com


1

You can access this information via the MajorVersionLimit and MajorWithMinorVersionsLimit properties of the Microsoft.SharePoint.Client.List object. For example (managed OM): string url = "http://yoursite/subweb"; using (var clientContext = new ClientContext(url)) { var web = clientContext.Web; List list = web.Lists.GetByTitle("YourDocLib"); ...


0

Instead of using radio buttons, you may be able to create a custom list which contains an "options" column as a single line of text and has the two options (Meat and Vegetable) within that list by adding them as items. Then, in the list form, you can have the form pull the "options" column from the custom list you just created through managed metadata. ...


1

The solution I would use instead of populating the options based on the selection would be to create two different fields in a list (meat options and vegetable options). With that you could throw in a simple script on a custom form to show the meat options when the meat radio button is selected and same thing for vegetables. This way all of your ...


0

Check this Miccrosoft KB for the issue


0

Auto -Hosted apps are going to be deprecated. Reccommended to covert it into Provider hosted or Sharepoint hosted.


0

You may try to add an OrderBy clause to your CAML query, to order by ID. ID is a naturally indexed column in SP, so ordering by ID should help overcome the 5000 threshold. To be done maybe in conjonction with a RowLimit to avoid the timeout... <OrderBy><FieldRef Name='ID' Ascending='TRUE' /></OrderBy> That would make: query.ViewXml ...


1

You can use script Web part and insert a tag style .ms-headerSortArrowLink{visibility:visibility !important; } The important should override the in line style


0

I had a similar issue when exporting a list with an appended column to Excel. I was able to capture the value being sent when no edit had been made to the appended column via a workflow history, and it was revealed to be saving <div></div>. I used a workflow to copy the values from the appended column to a different column now used in report ...


1

Open site in SharePoint Designer From left navigation choose Lists and Libraries Open the list in question Now from right pane - Look under "Custom Actions" Select the action to delete Use Ribbon "Delete" button OR press Delete key


2

According to Working with folders and files with REST the following example demonstrates how to create a Folder: url: http://site url/_api/web/folders method: POST body: { '__metadata': { 'type': 'SP.Folder' }, 'ServerRelativeUrl': '/document library relative url/folder name'} Headers: Authorization: "Bearer " + accessToken X-RequestDigest: form ...


0

If hiding the column is sufficiënt you can use Nadeems' answer. You can also hide the information securely using out of the box techniques explained below. The steps create a seperate (custom) list only for SSN's give this list the read permissions as you would like your SSN column to have add a sample SSN (use the title field) In your main list (not the ...


1

The problem is that in earlier versions of SP (2007 and 2010) there was an actual calendar list (type 106) that came prepopulated with "properly" named columns. owssvr.dll is looking for columns with internal names of EventDate and EndDate. So create columns with those names. (You can change the display names later if you want.) Found the answers in these ...


1

You can use the Fields REST API. First you would get the fields, then you could enumerate through each to get the current default values. If the user changes the default value, you could use a HTTP MERGE request to update the DefaultValue property. This could all be done with HTML JavaScript. A nice addition would be to use the ...


0

In Volumes list you can add a new column named Providers. Then choose the type as look up from another list. Choose Provider List. Update - Many columns in other lists may not show in lookup list. Some common columns such as ‘id’, ‘version’ etc. can be shown in most cases. When you create a new lookup column and pick a list from the "Get Information from:" ...


0

In list 2, you would go into List Settings, and click on Versioning Settings. Set the require content approval to No.


2

JSOM var listTitle = 'Tasks' var itemId = 1; var fileName = 'Instruction.docx'; var ctx = SP.ClientContext.get_current(); var list = ctx.get_web().get_lists().getByTitle(listTitle); var item = list.getItemById(itemId); var attachmentFile = item.get_attachmentFiles().getByFileName(fileName); attachmentFile.deleteObject(); ctx.executeQueryAsync( ...


1

I have done it using SPServices and it works fine. Below is the code: $().SPServices({ operation: "DeleteAttachment", listName: "List Name", listItemID: itemId, //list item id url: filePath, //url of attachment that needs to be deleted completefunc: function (xData, Status) { console.log('Deleted'); } }); Source you can ...


0

I hope you mean JSOM and not JSON, Yes we can create list with JSOM you can follow this sample function createList() { var clientContext = new SP.ClientContext.get_current(); var oWebsite = clientContext.get_web(); var listCreationInfo = new SP.ListCreationInformation(); listCreationInfo.set_title('CustomList'); // list name ...


0

There is no OOB way of limiting the access to a list column. The column can be hidden from the form using JavaScript but users can still see the page source and grab the information from there. Following example shows how to do it using JavaScript: <script type="text/javascript" src="/Shared%20Documents/JS/jquery.min.js"></script> <script ...


0

I ended up just embedding a Google spreadsheet using the following instructions and it was extremely easy to set up, supports formulas, support live updates to the data, and even has multiple tabs. Wish I had found that option a week ago! http://googledrive.in30minutes.com/google-sheets-embed-live-spreadsheet/


0

Received brilliant answer from Hilary Stoupa on another forum. I could just set one column of the row to be a value from secondary source. Problem was I got same value on every row. Hilary gave me filter statement [count(current()/../preceding-sibling::group2) + 1] It works :-) I now get a different value on every row. Set up multiple default rows and add ...


0

When you start to inherit permissions on the list from the site, you don't effect the items that already have unique permissions. It only effect new items. They could be set up in a way that only the author are able to read the item. If so, the user having control over the item needs to either 1) start inherit permission or 2) give administrative users ...


2

PirateEric's comment is correct. Though, it's not that SSRS respects item level permissions, as SSRS is just making calls like any other app. So it's entirely the responsibility of SharePoint to implement permissions. If SSRS makes the call as a user with access to everything, then the report will have everything. If SSRS makes the call as the current user, ...


1

You can use just a small trick as mentioned below. Sample Code : foreach (SPListItem item in list.Items) { foreach (SPListItemVersion itemVersion in item.Versions) { if (item.File.Versions.GetVersionFromLabel(itemVersion.VersionLabel) != null) { ...


1

You can split the version label and check is the second part 0 string[] versionArray = itemVersion .VersionLabel.Split('.'); int minorVersion = Convert.ToInt32(versionArray[1]); if (minorVersion == 0) { //this is a major version } or you can check the reminder when dividing VersionId with 512 int modulo = itemVersion.VersionId % 512; if (modulo == 0) ...


0

The way I got around this was setting up my workflow to e-mail myself, creating a rule in Outlook that recognized a unique subject (like "[SP] New Item Created"), and redirected it to desired group. More information on Outlook rules here: https://support.office.com/en-sg/article/Manage-email-messages-by-using-rules-c24f5dea-9465-4df4-ad17-a50704d66c59 I ...



Top 50 recent answers are included