cancel
Showing results for 
Search instead for 
Did you mean: 

Advanced mode config : how to compare workflow date variable ?

milonette_
Star Collaborator
Star Collaborator

Hello,

I would like to compare a workflow variable to a date formatted value but couldn't find the good EL expression on

  • [http://doc.nuxeo.com/display/NXDOC/Manage+layouts#Managelayouts-ELexpressionsinlayoutsandwidgets][1]

It looks like date are still converted to string and the default formatter is squeezing the year in only the last 2 numbers.

This is my advanced mode configuration test failed because of toString conversion on date :

 #{layoutValue.get('birthDate')==null || layoutValue.get('birthDate').format('dd/MM/yyyy').equals('31/12/2999') ?'view':'hidden'}

Do you know how to do that ?

thanks [1]: http://doc.nuxeo.com/display/NXDOC/Manage+layouts#Managelayouts-ELexpressionsinlayoutsandwidgets

1 REPLY 1

milonette_
Star Collaborator
Star Collaborator

As that kind of test are not possible because we got 'object' no string :

FAIL layoutValue.get('emplBirthDate').format('dd/MM/yyyy') == layoutValue.get('wkDefaultDate').format('dd/MM/yyyy') FAIL

I used a workflow-var that is used for initialisation that is name defaultDate :

#{layoutValue.get('wkVMyvar')==layoutValue.get('wkDefaultDate') ?'view':'hidden'}

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.

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.