<?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 Re: Advanced mode config : how to compare workflow date variable ? in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/advanced-mode-config-how-to-compare-workflow-date-variable/m-p/326526#M13527</link>
    <description>&lt;P&gt;As that kind of test are not possible because we got 'object' no string :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;FAIL layoutValue.get('emplBirthDate').format('dd/MM/yyyy') == layoutValue.get('wkDefaultDate').format('dd/MM/yyyy') FAIL
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I used a workflow-var that is used for initialisation that is name defaultDate :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;#{layoutValue.get('wkVMyvar')==layoutValue.get('wkDefaultDate') ?'view':'hidden'}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This works.
To initialise properly this defaultVar "calendar Var", I set milliseconds, seconds, minutes, hour... to 0 and get only day month year to values.&lt;/P&gt;</description>
    <pubDate>Fri, 13 Sep 2013 14:59:08 GMT</pubDate>
    <dc:creator>milonette_</dc:creator>
    <dc:date>2013-09-13T14:59:08Z</dc:date>
    <item>
      <title>Advanced mode config : how to compare workflow date variable ?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/advanced-mode-config-how-to-compare-workflow-date-variable/m-p/326525#M13526</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I would like to compare a workflow variable to a date formatted value but couldn't find the good EL expression on&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;[http://doc.nuxeo.com/display/NXDOC/Manage+layouts#Managelayouts-ELexpressionsinlayoutsandwidgets][1]&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;It looks like date are still converted to string and the default formatter is squeezing the year in only the last 2 numbers.&lt;/P&gt;
&lt;P&gt;This is my advanced mode configuration test failed because of toString conversion on date :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt; #{layoutValue.get('birthDate')==null || layoutValue.get('birthDate').format('dd/MM/yyyy').equals('31/12/2999') ?'view':'hidden'}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Do you know how to do that ?&lt;/P&gt;
&lt;P&gt;thanks
[1]: &lt;A href="http://doc.nuxeo.com/display/NXDOC/Manage+layouts#Managelayouts-ELexpressionsinlayoutsandwidgets" target="test_blank"&gt;http://doc.nuxeo.com/display/NXDOC/Manage+layouts#Managelayouts-ELexpressionsinlayoutsandwidgets&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2013 11:49:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/advanced-mode-config-how-to-compare-workflow-date-variable/m-p/326525#M13526</guid>
      <dc:creator>milonette_</dc:creator>
      <dc:date>2013-06-18T11:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced mode config : how to compare workflow date variable ?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/advanced-mode-config-how-to-compare-workflow-date-variable/m-p/326526#M13527</link>
      <description>&lt;P&gt;As that kind of test are not possible because we got 'object' no string :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;FAIL layoutValue.get('emplBirthDate').format('dd/MM/yyyy') == layoutValue.get('wkDefaultDate').format('dd/MM/yyyy') FAIL
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I used a workflow-var that is used for initialisation that is name defaultDate :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;#{layoutValue.get('wkVMyvar')==layoutValue.get('wkDefaultDate') ?'view':'hidden'}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This works.
To initialise properly this defaultVar "calendar Var", I set milliseconds, seconds, minutes, hour... to 0 and get only day month year to values.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2013 14:59:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/advanced-mode-config-how-to-compare-workflow-date-variable/m-p/326526#M13527</guid>
      <dc:creator>milonette_</dc:creator>
      <dc:date>2013-09-13T14:59:08Z</dc:date>
    </item>
  </channel>
</rss>

