Tag Info

New answers tagged

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();


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

Yes, HTML/JavaScript in a Calculated Column which colors the row, or cells might be an option for you. This colors the row based on the Priority field (detailed explanation here) =[Priority] &IF([Task Status]="Not Started" , "" , &"<img src=""/_layouts/images/blank.gif"" onload=""{" ...


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


0

I would recommend to add the lookup afterwards by code (Feature) if the list definitions are not working properly.


0

I could not solve the problem but came up with a work around for the problem: Since, i was making a custom form and making changes in that; the validation for uniqueness was not triggering. So, in the default new form I made all the custom design changes via Jquery rather changing them directly in the form (as ListFormWebPart cannot be edited via ...


0

You can use SPServices to achieve this: https://spservices.codeplex.com/wikipage?title=%24%28%29.SPServices.SPCascadeDropdowns $().SPServices.SPCascadeDropdowns({ relationshipWebURL: "", relationshipList: "", relationshipListParentColumn: "", relationshipListChildColumn: "", relationshipListSortColumn: "", parentColumn: "", childColumn: "", ...


0

I could suggest two approaches here: 1.) Create a Data View Webpart in Sharepoint Designer. 2.) Create a Calculated column of type number and you can add html there. I would suggest first one, because there are 40 columns and for the second approach you will have to create an extra column for each column.


0

If you are using a SharePoint designer workflow, create a hidden fields in the content type. The purpose of this is to hold the value of the field you want to evaluate. In your workflow evaluate the value of the two fields, if they are different then you know a change occurred. The last step of the workflow is to update the hidden fields value so the next ...


0

For first issue Replace #adding the new list to the list collection $spListCollection.Add("Studentlist1","Studentlist1",$spTemplate) #get the path of subsite and sitecollecion $path = $spWeb.url.trim() #get the list to the list object $spList = $spWeb.GetList("$path/Lists/Studentlist1") With #adding the new list to the list collection $lstId = ...


0

You are able to use Rich Text and Enhanced Rich Text in a SharePoint list. First, you need to make sure the column is set up appropriately. (List Settings -> Click on column name -> Make sure it is Multi Line of Text column and that at least Rich Text is allowed). Copying the formatting directly from Excel doesn't work but you are able to format it after ...


-1

SharePoint 2013 handle only some column types like: 1 line of text, multiple lines of text, number, date, ... but not the style of text. To make bold text in a SharePoint table, you can modify the CSS of the page.


1

You can get the version history using following URL format /_layouts/Versions.aspx?list={list guid}&ID={item id} Replace List GUID and Item ID


0

Going to shoot from the hip and offer search as a possible solution. If you created a managed property that maps to all 5 of the crawled properties corresponding to your 5 columns, then a search for "Site A" will show all items where Site A is in one of the 5 columns. You can then customize the search display to something nicer, and you could even end up ...


0

If I understand your requirements correctly, the best option will probably be to do the following: Create a web part page called "Summary" (or whatever you need) Open that page in SharePoint Designer and create a new DVWP on the page Use your forms library as the data source for the DVWP Insert custom grouping that will group (and total) forms based on ...


1

The easiest way to determine whether an item was updated by workflow or actually updated by a user is to have your workflow run under a system account using the Impersonation feature. Then, in your notification workflow, use the condition to check who the item was last modified by. If it's the system account, stop the workflow. Otherwise, send the ...


1

Additionally to the answer of Amal Hashim, if is suitable for your situation, you can create the Days Left column as a calculated column based on Expiration and current date, avoiding the need for update Days Left from the daily executed workflow.


4

This will be a challenge to do through Workflows. The reason being we can't get the previous value to compare and confirm which field was updated. In such use cases we should use Event Receivers. It has AfterProperties and BeforeProperties. We can use those to compare and confirm whether the field updated is DaysLeft. If you prefer workflow's then before ...


0

Yes. You can enable content approval from List Settings. This will ensure the items get saved as drafts and other users will not see it until its approved. https://support.office.com/en-ca/article/Require-approval-of-items-in-a-site-list-or-library-cd0761c4-8c3f-4ea2-9435-13c28aa23d08


3

The following example demonstrates how to retrieve list items for a View using SharePoint REST: function getListItems(webUrl,listTitle, queryText) { var viewXml = '<View><Query>' + queryText + '</Query></View>'; var url = webUrl + "/_api/web/lists/getbytitle('" + listTitle + "')/getitems"; var queryPayload = { ...


0

Using REST you can't get items from a view. For that you have two options Get the view fields and form a query Create a CAML query and use it to get the items. https://social.msdn.microsoft.com/forums/sharepoint/en-US/a5815727-925b-4ac5-8a46-b0979a910ebb/query-listitems-by-view-through-rest-api



Top 50 recent answers are included