SharePoint 2010: How can I pre-fill Scheduling Start and End Date? - date

I would like to know how to pre-fill the Scheduling Start and End Date in the metadata/properties of each item edited or created in a SharePoint list.
Scheduling Start Date: Today's date.
Scheduling Start Date: Today's date + one year.
Reason for ask: I configured the list items to expire and move into "draft" status when they hit their specified Scheduling End date, therefore un-publishing the item from external view.
Problem: Users/contributors are creating these items and are not entering enough time for it expire. What I'd like to do is automatically pre-fill the scheduling end dates for one year out from today's date when an item is edited or created.
Background info: I've enabled scheduling of items in a list (via "Enabling scheduling of items in this list" option in "Manage item scheduling" in Library Settings). I currently have a workflow and versioning enabled so that the admins check the content before it's view-able externally.
Your thoughts are appreciated.

This is pretty easy using Calculated Field Formulas in the default value fields of your two columns. Here and here are discussions on the basics of setting a default value for a date field, but it's pretty straightforward.
For Scheduling Start Date, set the default value to Today's Date. For Scheduling End Date, use the calculated value of =DATE(YEAR(Today)+1,MONTH(Today),DAY(Today)) for the default value.

Related

Delivery plans Target date

I used to be able to edit the target date just by moving the edge of the card on delivery plans. But Today, every story I create has the target date associated to the iteration and not the day it should finish.
Is this any type of configuration I'm missing os is it a bug from devops?
Best,
Ricardo
I tried to find a configuration that addresses this issue but I couldn't find anything
Check this practics: https://learn.microsoft.com/en-us/azure/devops/boards/plans/review-team-plans?view=azure-devops#best-practices-for-using-a-delivery-plan
Use Start Date and Iteration to specify the time frame for a work
item. Or, use Start Date and Target Date. However, don't specify both
Iteration and Target Date for a work item. Target Date will always
override the Iteration end date on the plan.
So.. you may set Target Date in your plan manually then the delivery plan will use Target Date as a planning point.
On the screenshot, the first work item uses start and target dates, and the second one start date and iteration:

Change kie container / drools engine run-time date dynamically

I have a requirement to run rules(.drl) for user specified date. I have Rules defined with date-effective and date-expires attributes. These rules run as per the server date.
But I would like to run these RULES as per the user specified date with out depending on the server date. Is there a way to set kie container run-time date as we would like to?
rule "apply slab"
agenda-group "calculation"
date-effective "01-Nov-2019"
date-expires "01-Dec-2019"
when
<condition>
then
<business processing logic>
end
I need to run the above rule as per use specified date. Let's say today is
21-Feb-2020 so by default this will not get run but if user wants to validate the rules for November month he should be able to do this irrespective of current date. I mean would like to run the above rule for lets say 01-Nov-2019 irrespective of current date? can I do this ? how ?
Thanks
Personally I never use "date-effective" and "date-expires".
It is easier to add those dates as normal constraints that you are going to compare with a date in one of your pojo (java classe), like effective date, or value date.
So that you can simulate anything you want but entering as input the date you want to use as a reference.
Regards

SSRS Preset or Custom Date Selection on Report

I currently have a report with the ability to select a start and end date. I was curious if you could make have both preset and the option for a custom selection
Selection:
Current Week, or
Previous Week, or
Custom Date Range.
Thanks,
Take a look at cascading parameters.
The link above seems to focus more on getting your cascading parameter values from a query, but you probably don't want that for a date - as far as I am aware, setting Available Values for a date parameter limits you to a dropdown list of dates, instead of the calendar which is generally easier to use. It is still a good background on how cascading parameters work though.
To do this with expressions for the default start/end date, you would basically want the first parameter to be a choice between "Current Week", "Previous Week", and "Custom Date Range". You would display those labels to the user, but the values can be whatever you want - for my test I just used 1, 2, and 3.
Then, you would set up 2 more parameters, one for the start date and one for the end date. Make sure the data type is Date. You will want to set up default values for these based on the value of the first parameter. I would do this with an expression such as the expression below for the start date. You also may need to modify this a bit depending on how you define the week - is the "Current Week" just the previous 7 days, or is it the latest Monday through today, or something else, etc.
=Switch(
Parameters!FirstParam.Value = 1, DateAdd("d", -7, Today()),
Parameters!FirstParam.Value = 2, DateAdd("d", -14, Today())
)
In this case, you don't even need to account for the 3rd option, because if the user wants a custom date range then you do not want the start and end date to fill in with any default values. You would need a similar expression for the default end date as well.
Since you want the user to be able to enter a custom range as well if they were to select the third option, you do not want to fill in the Available Values for the start/end date parameters, as the user would then not be able to select any date (at least as far as I am aware - if there is a workaround to that, I would love to see it, as that would be something I would like to use myself).
A possible downside to this approach is that if the user begins by selecting Current Week and then changes their mind to Previous Week, the start/end dates will not change to the Previous Week. You can read more about why this happens here, but essentially: since the values that are already filled in after selecting Current Week are still valid (they are dates, which is the only criteria for those parameters since no available values are set up), they will not refresh after changing the selection. The fix for this is to define the Available Values, but as mentioned above, this will then stop the user from entering a custom date range.

Is there a way to check date dynamically in eloqua?

Context: I am using Microsoft Dynamics (CRM) and Eloqua to send email campaigns. I have a date field in CRM that I want to check against in Eloqua for a specific campaign. This campaign needs to check to see if the date field is <= today's date + 90 days. I am using the campaign UI in Eloqua, not doing anything programmatically at this point.
I have tried using the Compare Custom Object Fields decision in Eloqua by finding the date field, setting the comparator to dynamically on or before, and I want to make the compared value Today + 90 days. I'm not sure how to accomplish this in this type of Decision object because the only options I have to compare the date field to are Yesterday, Today, or Tomorrow. See image below:
I have also tried to use the Compare Date Decision object, but there is no dynamic comparison, just hard-coded date options.
The last thing I tried was a Wait step, but that only waits a hard-coded number of days rather than checking dynamically.
Has anyone run into this issue or know of a solution to this problem?
We were able to find an Eloqua Date App to download that adds a Date Decision step to the program builder which allowed us more flexibility with comparing dates in a custom range.

XPages date field value changes from AM to PM

I have created a managed bean to handle monitoring field changes on an XPage. The application requires that all changes to fields be logged. I have integrated the bean into a custom control on the XPage and it is created/instantiated when the user toggles the control from read only to editable. There is one Date/Time field set up to display only the date. The Notes document field is also set to display only the date. When the bean is instantiated and the SSJS obtains the date via getComponent - it returns the date like this: mm/dd/yy 12:00 AM. I have another button configured to get all the updated field values when it's clicked. When I click the second button it flags the date field as having been changed when it hasn't. The "updated" value is: mm/dd/yy 12:00 PM. If I trigger the initial and update code in the first button I get AM for both values. When I trigger both initial and update after the control is switched to edit mode by itself I get PM for both values. So it seems that getComponent is returning different values based upon the partial refresh event for readonly to editable. I tried using the afterRender event, but still get the AM/PM problem. Has anyone else encountered this problem? If so, any solutions? Assuming it's an issue with the mode change, any suggestions on how to capture when the change is complete and then trigger my code?
The default value for a date/time field which only stores a date is 12:00 midday. That's to handle Daylight Savings Time adjustments and I suspect the Java Date() to NotesDateTime conversion is doing the manipulation. (NotesDateTimes that are date only are stored with no timezone, so any conversion of 12:00am across DST boundaries may end up changing the date, whcih you don't want; e.g. adjusting 6 June forward 6 months with a time of 12:00AM would change it to 5 Dec, because it would drop back an hour.
I would recommend setting a default value that includes 12:00PM