SharePoint Recurring Event Start Date - sharepoint

This one is driving me nuts, so I hope someone may be able to help.
Each recurring event will show the Start Time, when used in sorting and calculations, of the first recurring event. The End Time has the same issue and reflects the last scheduled recurrence.
I need to use the actual ever date. I am creating a flow to add the current day’s tasks from a SharePoint calendar into a Planner task plan. I want that flow to only pull the current day events from the calendar.
The tools I may use for this include SharePoint, SharePoint Designer, and flow.
Does anyone have many guidance in how I may be able to accomplish this?
Thank you in advance for taking the time to review my inquiry.

Got it!!
Here are the steps I performed:
1) In SharePoint, create a copy of the Current Events view
2) Open SharePoint Designer
3) Open the view created in #1
4) Navigate to the Query Where statement
5) Change the towards the end of the date range overlap to
Before:
<Where>
<DateRangesOverlap>
<FieldRef Name="EventDate"/>
<FieldRef Name="EndDate"/>
<FieldRef Name="RecurrenceID"/>
<Value Type="DateTime">
<Now/>
</Value>
</DateRangesOverlap>
</Where>
After:
<Where>
<DateRangesOverlap>
<FieldRef Name="EventDate"/>
<FieldRef Name="EndDate"/>
<FieldRef Name="RecurrenceID"/>
<Value Type="DateTime">
<Today/>
</Value>
</DateRangesOverlap>
</Where>
This gave me the correct current day view that may now be leveraged in Flow.

You can have my DLL for the fetching it with c# code. Kindly install the dll and use it in below manner.
https://github.com/shafeequealipt/Share-Point-Recurrance-event-splitter.
EventSplitter obj = new EventSplitter(); var x =
obj.Execute(Site,
ListName, Username, Password, Convert.ToInt32(Hour));
Out_dataTable = x.Item3;
Message = x.Item1;
Success = x.Item2;
Parameters
Site = Share point site URL, List Name = Share point List Name , Username = Username to access the site , Password = Password to access the site, Hours = Time to which you have to fetch details
Example: If we mention 9 in hours, the DLL will fetch details of all resources, which is available in calendar from current time to next 9 hours.
This may resolve your issue

Related

Add-PnPDataRowsToProvisioningTemplate with empty -fields parameter not working?

I want to use a modern SPO team site als a template for similar projects with a prefilled task list (very similar projects).
I created a site template with Save-PnPProvisioningTemplate and tried to add the Data rows with Add-PnPDataRowsToProvisioningTemplate and a empty -fields parameter but that does not work. I need exact the same task list as in the template.
Does anybody know if this is a bug?
I already discussed on this particular topic right here: https://learn.microsoft.com/en-us/answers/questions/211447/copy-spo-team-site-with-task-list-contensrow-data.html?childToView=215328#answer-215328 but wanted to check here before I post a bug on github.
Thanks
Chris
According to the documentation of Add-PnPDataRowsToProvisioningTemplate for the parameter fields:
The fields to retrieve. If not specified all fields will be loaded in
the returned list object.
So, if you leave the -fields parameter empty, it will load all fields including default system fields like Created, Created By, Modified... These default fields are generated by SharePoint and could not be added/edit manually. I think that's the reason that would not work.
So you need to specify the fields parameter which can be edited by end users. Like
column duedate, Title, startdate in the command.
Note: you need to use the internal name of the column, for the description column in the task list. The internal name is Body.
You could change field in the template <FieldRef Name="Description" /> to <FieldRef Name="Body" />. Maybe it would work fo you

SharePoint: Custom alert template for a specific list view

Is it possible to use a different alert template for a specific list view?
An example... My list sends alerts using the default OOTB "SPAlertTemplate.GenericList" template whenever new items are added to it. However I want to instead use a custom email template whenever items are added that appear in the High Risk Incidents view.
I know how to create custom alert templates and associate them with a specific list -- just not how to associate them with a specific view of a list.
According to the Alert template documentation you can use CAML in the FilterDefinition property to control what items are shown.
I don't believe you can point it at a view directly, but you could use the same conditions in your view in the FilterDefinition.
So if your view was made up of the condition RiskLevel=1 then you could use something like the following:
<FilterDefinition>
<FriendlyName>CustomFilter1</FriendlyName>
<ShortName>CustomFilter1</ShortName>
<Query>
<Eq>
<FieldRef name="RiskLevel"/>
<Value Type='Text'>1</Value>
</Eq>
</Query>
Some of these links may help:
Alert Template Format -
http://msdn.microsoft.com/en-us/library/bb802961(v=office.12).aspx
Intro on CAML Query -
http://sharepointmagazine.net/articles/writing-caml-queries-for-retrieving-list-items-from-a-sharepoint-list

SharePoint List Of Recently Updated Pages

I am trying to find a way to inform a group of users whenever any of the pages in our SharePoint site are updated.
Originally we were going to use alerts, but we have numerous subsites in our site. This means (to the best of my knowledge) that we will have to set up alerts for every subsite. This is not an option because subsites will be created and removed and we would rather not add an extra step here.
Secondly, we wanted to use a Content Query webpart to simply show all pages that were updated in the last 5 days. This would allow us to show every page for every site, but I can't figure out how to get it to only show items with an update date >= today's date - 5.
If anyone can help me out, I would really appreciate it. Thanks!
I think you're on the right track with the Content Query Web Part. Unfortunately out of the box it forces you to set a specific date rather than a certain number of days.
Your best option is to override the Content Query Web Part or write your own that provides the functionality you require. There may also be other query web parts available that do this for you. If you write your own, the following CAML query should help:
<Where>
<Geq>
<FieldRef Name='Modified' />
<Value Type='DateTime'>
<Today OffsetDays='-5' />
</Value>
</Geq>
</Where>
The What's New Web Part by Jan Tielens is good for this sort of thing, and it has a few configurable parameters, such as maximum age of items, scope (recursive etc) and the ability to filter by content types.
http://smarttools.codeplex.com/Wiki/View.aspx?title=What%27s%20New

Issue accessing SharePoint list data using SSRS 2008

I'm trying to access list data using SSRS 2008.
I have created an XML data source with the following connection string:
"http://[Your_Site_Name]/_vti_bin/lists.asmx".
I then created a dataset with the following query:
<Query>
<SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetListItems</SoapAction>
<Method Namespace="http://schemas.microsoft.com/sharepoint/soap/" Name="GetListItems">
<Parameters>
<Parameter Name="listName">
<DefaultValue>Your_List_Name</DefaultValue>
</Parameter>
</Parameters>
</Method>
<ElementPath IgnoreNamespaces="True">*</ElementPath>
</Query>
Now the problem:
I'm having issues reading column values that have html markup/tags(specifically "Mulitple lines of text" field type). Reporting Services creates a field called “row” in the Dataset when it encounters one such column.
I tried deleting this “row” field and created the actual field manually. I then set the column value as HTML in the placeholder properties (a new feature in SSRS 2008 where HTML markup is treated as styles) but did not work.
For e.g. Comments column in "Issue Tracking List" is stored as a "div"
Executing the same query in CAMLBuilder works perfectly, showing up all columns.
How do I get over this issue. Any help?
Thanks in advance
PS: I have posted the same query on MSDN SQL Server Reporting Service Forum. Here is the Link.
I posted the same query on MSDN SQL Server Reporting Service Forum. Here is the Link. MSFT moderator has found a solution for this issue.

SharePoint: Filtering a List that has Folders

I have a SharePoint document library that has a folder structure used for organizing the documents (but also for controlling access, via permissions on the folders).
The documents in the library are updated every month, and we store every month's version of the document in the same folder; there's a "month" column used for filtering that will contain values like Jan 09, Feb 09, etc. It looks like this:
Title Month
----- -----
SubFolder 1
SubFolder 2
[] Interesting Facts Jan 09
[] Interesting Facts Feb 09
[] Interesting Facts Mar 09
[] Fascinating Numbers Jan 09
[] Fascinating Numbers Feb 09
...
Now, because users will generally be most interested in the 'current' month, I'd like them to be able to apply a filter, and select (say) Mar 09. However, if they do this using the built-in filtering, it also filters out the folders, and they can no longer navigate the folder hierarchy. This is no good - I want them to be able to move between folders with the filter intact, so that they don't need to keep switching it off and on again.
I figured I might be able to use a custom view (selecting where type=folder or month=[month]), and to an extent that does work. However, I can only get it to work for a fixed month, whereas I need the user to be able to select the month - perhaps via a drop-down control on the page (and I don't want to create 60 views for 5 years' worth of months, nor do I want to have to create a new view every month).
I thought it might be possible to create a view in code (rather than via the UI), but I've not been able to figure out how to get a dynamic value (a user-specific setting) into the CAML query.
Any pointers gratefully appreciated! And by the way, I am aware of the dogma that folders are bad, and that everything should just be a list. However, having considered the alternatives, I still favour using folders - if I can solve this problem.
Thanks in advance.
Could you create a content type that inherits from Folder that contains a Month column? Then, replace the normal folder content type with your new one on this list. Set the month appropriately, and now your filter would contain the folder as well.
You might like to try using a DataViewWebpart filtered by a form webpart to do this.
Managing the display of the folders and then the folders items when it is clicked on will be a problem. That is one of the reasons for not using folders I guess.
I'm currently experiencing the exact same issue, instead of a simple date, I need to filter based on folder names and then then show those folders on the page. Once they click a folder they will then be able to view the content of that folder.
I haven't found a good solution for this just yet, but for yours, you should be able to simply create a custom CAML query using the contentQueryWebpart.
Something like this:
Further Customize CQWP
But you would do it on the date/time of the folder and nothing else.
Your query would be something like:
<![CDATA[
<Where>
<Gt>
<FieldRef Name="Created" Nullable="True" Type="DateTime"/>
<Value Type="DateTime"><Today /></Value>
</Gt>
</Where>
<OrderBy>
<FieldRef Name="Created" Nullable="True" Type="DateTime"Ascending="FALSE"/>
</OrderBy>]]>
I would add also the name of the folder you're looking for to make sure nothing else gets returned.
Hope this helps. And please do postback if you find another solution.
I think I found your solution - The DataWebPart is actually what helped me....
Using this also was a huge eye opener:
ASP.NET Controls Filter Data View
To summarize it, you can simply populate your dropdown with the month year combo, add the shared Doc library on the page via the designer view, use a 'filter' connection to your ASP.NET dropdown and pronto you have a filter on a per month.
You can also have it default to a certain date using XSL, it's all in the code-view now :)
#Gary
The Controls filter of the DATA view (my 2nd answer) actually does keep the folder hierarchy.
You can have it go into sub-folders if needed, but in your case you're only interested in showing one specific folder correct?
What you're doing is useing SP-designer to do it, I couldn't find a way to do it via the regular webparts.
drag and drop your shared document library in the 'design' view for the page
Click the common task arrow ( > ) and customize the columns you want to show
Still in the common task, apply a filter of choice. What you want to do here is apply a filter on your Month column, so that the Month column is equal to the current month/year, correct?
The filter will only give you a choice to type something in, type the current month, say May 09. then switch to 'code' view
Find the shared document library, and more specifically look for something like:
&lt ;Where&gt ;.... That is the CAML query I had mentioned before. You can do an HTML decode on the whole thing, so that it's a bit more readable.
But in essence, the filter is a simple CAML query.
You want to modify that query, so that your month/year combo is that of the current month/year.
CAML has one feature called <MONTH/> which returns the month in the following format: mm/yyyy (you may need to change the format on your column or create a new one to make it easy on yourself) - Your CAML query should be something a bit like this:
<Where>
<Eq>
<FieldRef Name='Month'/>
<Value Type='Number'><Month/></Value>
</Eq>
</Where>
or
html encoded:
&lt ;Where&gt ;&lt ;Eq&gt ;&lt ;FieldRef Name='Month'/&gt ;&lt ;Value Type='Number'&gt ;&lt ;Month/&gt ;&lt ;/Value&gt ;&lt ;/Eq&gt ;&lt ;/Where&gt ;
The key to this, is that you're only creating a filter at the root level, on the data view. Once they click on the folder, they're just thrown into the document library and can view everything within the folder.
Hope this help!
ps: on the html encoded I had to add spaces before the ';' so you could see the code.
I have worked a great deal with filtering and the SPGridView. Maybe you can get something out of looking into this post on my my blog.
As I said, don´t know if it will help you but have a look.

Resources