<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Automation Chain + date null : Set a Date var to null ? in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/automation-chain-date-null-set-a-date-var-to-null/m-p/321251#M8252</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I want to init a Date variable to "no value".
Is it possible ?&lt;/P&gt;
&lt;P&gt;thank you&lt;/P&gt;</description>
    <pubDate>Thu, 18 Apr 2013 17:13:01 GMT</pubDate>
    <dc:creator>milonette_</dc:creator>
    <dc:date>2013-04-18T17:13:01Z</dc:date>
    <item>
      <title>Automation Chain + date null : Set a Date var to null ?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/automation-chain-date-null-set-a-date-var-to-null/m-p/321251#M8252</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I want to init a Date variable to "no value".
Is it possible ?&lt;/P&gt;
&lt;P&gt;thank you&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2013 17:13:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/automation-chain-date-null-set-a-date-var-to-null/m-p/321251#M8252</guid>
      <dc:creator>milonette_</dc:creator>
      <dc:date>2013-04-18T17:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: Automation Chain + date null : Set a Date var to null ?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/automation-chain-date-null-set-a-date-var-to-null/m-p/321252#M8253</link>
      <description>&lt;P&gt;Hello Me,&lt;/P&gt;
&lt;P&gt;The widget date always show a defaut date if date is null. No way to have NO VALUE for the widget date.&lt;/P&gt;
&lt;P&gt;You have to go arround the problem.&lt;/P&gt;
&lt;P&gt;A) Set a document property to NULL&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;Document &amp;gt; remove property
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;B) Use a not mandatory workflow var that user will not change using the widget and it should be still to a default "null" value.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;P&gt;run a script where you Define a default date : wkDefaultDate to 01/01/2999&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;Run a script to initialize your var&lt;/P&gt;
&lt;P&gt;WorkflowVariables["myDate"]=WorkflowVariables["wkDefaultDate"];&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;if needed to set to null workflow var date // After the node with the date widget =&amp;gt; if the user didn't change the date&lt;/P&gt;
&lt;P&gt;Run Script
if(WorkflowVariables["myDate"] ==WorkflowVariables["wkDefaultDate"]){
WorkflowVariables["myDate"] = null;
}&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;If needed // Before enter in (input node) the node with not date widget, reset the date to defaut :&lt;/P&gt;
&lt;P&gt;Run script
if(WorkflowVariables["myDate"] == null){
WorkflowVariables["myDate"] = WorkflowVariables["wkDefaultDate"];
}&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;Update the document-property later with the workflow var not mandatory saved value if needed:
Run Script&lt;/P&gt;
&lt;P&gt;if(WorkflowVariables["myDate"] != null &amp;amp;&amp;amp; WorkflowVariables["myDate"] !=WorkflowVariables["wkDefaultDate"]){
Document.doc.setPropertyValue("myxpathname:myDate",WorkflowVariables["myDate"]) ;
}&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Wed, 07 Aug 2013 17:50:58 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/automation-chain-date-null-set-a-date-var-to-null/m-p/321252#M8253</guid>
      <dc:creator>milonette_</dc:creator>
      <dc:date>2013-08-07T17:50:58Z</dc:date>
    </item>
  </channel>
</rss>

