I am trying to calculate the last working day for a process. Typically, this will be yesterday. However, if the process runs on a Monday it should bring back the date of Friday.
My calculation is:
Today()-MakeTimeSpan(1, 0, 0, 0)
Current code stage
The Best Practice in this area is to use VBO called "Calendars", that is a Internal one, built in the BluePrism.
Object: Calendar
Action: Add working days
Calendar Name: "Working Week / No Holidays"
Date: Today()
Days -1
An advantage of that solution is that you can customize the calendar to add all Holidays that are Bank Holidays for your company.
In the past, I've been able to accomplish this by using a dedicated Utilities object with an action that's just a single code stage. The action has a single Output connected to a single output of the Code stage.
out = DateTime.Now.AddDays(-1)
While out.DayOfWeek = DayOfWeek.Saturday Or out.DayOfWeek = DayOfWeek.Sunday
out = out.AddDays(-1)
End While
This also opens the ability for you to add complex logic to account for holidays in your locale(s) without cluttering up your action page.
Related
I would like to do a query on Azure Devops considering the condition:
work item = Task and
created date < ["Start date of #CurrentIteration"] and
iteration path = #CurrentIteration
How can I perform this contintion (["Start date of #CurrentIteration"]) on Azure Devops?
How can I perform this contintion (["Start date of
#CurrentIteration"]) on Azure Devops?
As I know there's no predefined macros that represents the start date of #CurrentIteration. We have to go Sprints tab manually to get the start date of current Iteration and then use that value in Query.
You can check this document for more details: To list work items based on when they were created, closed, resolved, or changed state—use #Today or specify dates. For queries that list work items based on their assignment to a team's current sprint, use #CurrentIteration.
For now we don't have such macros like #StartOfCurrentIteration. But it would be better if we have one macros used to represent the start date of #CurrentIteration. So I suggest you can post one feature request(Suggest a feature) of this macros in our User Voice forum-Developer Community Forum.
Thank you for helping us build a better Azure DevOps. Hope my answer makes some help:)
In SharePoint 2007 document library I want to send automatic email notification to user two days before expiry date.
After expiry date document will remain in the library.
Any suggestions would really be appreciated.
You just need to create workflow in SharePoint designer. During creation of an item the workflow starts and waits until execution date. If expiry date can be changed you need another action which cancels old workflow (with old date) and starts new one (with need date).
Here you can find instruction how it can be done in SPD
Create a SharePoint Designer (SPD) workflow
Select your task list
Set it to run on Create
Click Next
In the Actions section add these three actions:
- Add time to date
- Pause until date
- Send email
My example looks like this after the properties are set:
Add -7 days to Tasks:Due Date (Output to Variable: ReminderDate)
then Pause until Variable: Reminder Date
then Email this message (you can hard code the address or use the assigned to... )
Notes for this very simple example:
- If someone edits the task and sets a new due date, this workflow will still send the reminder based on the old date.
- It does not check to see if the Due Date is at least two days in the future.
Ref: http://social.msdn.microsoft.com/Forums/en-US/acb12dd2-d6a5-4b7e-b233-037558bfa2e5/start-workflow-x-days-before-expiry-date?forum=sharepointcustomizationlegacy
First the problem:
I am simply trying to export an MS Project plan to excel and then import it back into project. Everything works fine for the most part (I create a mapping with primary key based on the task IDs). However, if I have a task that has lets say 20% in the % complete field, upon import MS Project marks it as 100% complete. When I look at the export, it contains .2000000001 in the % complete field I've tried changing it to .2, 20%, etc., but I don't think this field even makes a difference.
I believe the problem is that there is an Actual Start Date with a date value, but the Finish Date is 12:00:00 AM (the same as other actuals with no value). For some reason MS Project adds in an actual finish date to match the planned finish date. If I change the value to 0, blank, or ‘NA’, it doesn’t pull the actual start date and marks the task as 0% complete.
I’m thinking that the % complete values aren’t actually imported and just calculated based off the actual dates. Any help or explanation would be appreciated!
Background on what I'm trying to do, in case anyone has any better ideas of how to go about this:
My team has a SharePoint list that we use to track deliverables. Within this list there are Planned and Actual dates of different types of reviews (peer, team lead, sign-off). I want to create a mapping between these list items, take an Excel extract of this list, take an Excel extract of the project plan, update the task completion percentages with VBA, and then import the excel project plan back into MS project.
(BTW, all software is 2010 version)
Found the answer, you need to export the project tasks to excel including, at least, the actual duration, unique task ID, and % complete fields. It is preferable to do this programmatically so that you can include a formula in the excel workbook so that changing your % complete will properly update the actual duration. Then, import the task list back into project.
When importing:
Merge the tasks
Make unique task ID the key
Only import the actual duration
Your % complete is calculated based off the actual duration, so it should now be updated.
I am developing a Daily list view ('Todays Support List') that displays support coverage for my company. Certain people are on-call for certain periods of time (days, or weeks)
I need to have a list that displays any events that are occuring on a particular day (today), which will show people who is on-call for that day.
The logic I have developed bases it's calculation on the begin and end date. If the begin date is later than yesterday, and before tomorrow, it shows in the list view. This works great if the appointment begins today and ends today, but if it begins last week and ends next week, it won't show up at all.
What I wish Sharepoint had built in, is the option to filter events that have [Today] anywhere between the Begin or End date.
I figured I would give it a shot from Sharepoint Designer and create a workflow (as the workflows have more options than the front-end) but I am stumped as to how to go about this. Many ideas have shot into my mind, but none of them have panned out due to ONE missing feature...
Has anyone ever tried to do anything remotely similar to this?
Create a view for the list and set the filter so that 'begin date' is less than or equal to [Today] And 'end date' is greater than or equal to [Today].
Is it possible to start a workflow automatically the first day of every month?
Edit:
In principle I think this has to be programmatically although if it can be achieved using an out of the box features it'd be easier.
Yes, you can start workflow using 2 diffrent approch as below.
Create one timer job which will run on every first of the month & kickoff the workflow programatically.
Create custom workflow which will run when item added but wait until 1st date of the month.
You can try creating a workflow for the list you are monitoring and set the action to wait until the 1st day of the month before doing the rest of the actions.