Action

Append Draft to Last Modified

Posted by sylumer, Last update over 3 years ago - Unlisted

Append the content of the current draft to the last modified draft. Effectively a simple merge operation.

Steps

  • script

    function appendToLastModifiedDraft(p_strTextToAppend)
    {
    	let adraftModified = Draft.query("", "all", [], [], "modified", true);
    	if (adraftModified.length > 0)
    	{
    		adraftModified[0].append(p_strTextToAppend);
    		adraftModified[0].update();
    		return true;
    	}
    	else 
    	{
    		app.displayErrorMessage("No drafts found");
    		return false;
    	}
    }
    
    appendToLastModifiedDraft(draft.content);

Options

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