Created This Day

Posted by agiletortoise, Last update over 3 years ago

Loads drafts created on the current date in previous years.

The action will prompt for the number of years ago to view, then create an open a workspace to display only drafts created on today’s date that number of years ago.

This is meant as an example of date filters in Workkspaces.


  • script

    function load(numberOfYears) {
    	// get date for previous year
    	let d =;
    	// create a workspace with a date filter for that day
    	let ws = new Workspace(); = "Created: " + strftime(d, "%Y-%m-%d");
    	let st = new QueryDate();
    	st.field = "created";
    	st.type = "absolute"; = d;
    	let end = new QueryDate();
    	end.field = "created";
    	end.type = "absolute" = d;
    	ws.startDate = st;
    	ws.endDate = end;
    if (app.isPro) {
    	let p = new Prompt();
    	p.title = "On This Day";
    	p.message = "Display drafts created on this date in a previous year. Select the 	number of years ago below."
    	p.addSelect("years", "Years ago", ["1", "2", "3", "4", "5"], ["1"], false);
    	p.addButton("Show", "Show", true);
    	if ( {
    		let years = parseInt(p.fieldValues["years"]);
    	else {
    else {
    	alert("This action uses Workspaces, which require a Pro subscription");


  • After Success Default
    Notification Info
    Log Level Info
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.