Advanced mode config : how to compare workflow date variable ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2013 07:49 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2013 10:59 AM
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.
