New UI - Color in views / Date Field - Forum - Rollbase - Progress Community

New UI - Color in views / Date Field

 Forum

New UI - Color in views / Date Field

This question is answered

Hi,

We are trying to do something very simple using the 'color' options in the views. Basically we have a date field, and we want to make the records with a date less than today red, and the records with a date equal to today green, for example.

When you select a date field (as shown below), there is no option 'equals'. I tried to combine 'less or equal' and 'greater or equal' to get to the equal case but it looks like it is applying only the first color. 

Also tried 'less' and 'less or equal', but the 'equal' records don't come up with any color.

Can you simply provide us with the equal option ? Or is there any trick to get to that case?

Thank you

Meryem

Verified Answer
  • Hi Thierry,

    This is nice and solves the problem of extracting the Todays records.

    Thank you

    Meryem

All Replies
  • Messages_v4 (1).xml

    Which version are you working on, this is working in the 4.0.4 version. The screenshot is as given below.

    I am also attaching the xml. It is not working when we use the keyword 'TODAY'. I shall investigate on that further and get back to you.

  • Hi Saraswathi,

    I don't see any screen shot. We are on 4.0.2 but we ll upgrade to 4.0.4 soon.

    Is the keyword 'TODAY' not working in 4.0.4 ?

    Thanks,

    Meryem

  • I suspect the reason you are not seeing an EQUAL operator is because the field you are using is a date/time field and not a date field.
    The EQUAL operator is not provided for time and for date/time fields.  However, it is provided for Date field.
    Additionally, the special token TODAY is only available for date field: See documentation.progress.com/.../
     
    I tested that you can use TODAY with a date field and it works:
    My view setting:
     
     
    I will look into if it’s feasible for us to support the tokens in DateTime fields (and in particular TODAY) so that you could still do what you are trying to do with less than and greater than rules.
     
    Hope this helps.
     
    Thierry
     
  • Hi Thierry,

    You are right. It is a date/time field. Sorry I didn't explicitly mention it but you got it :)

    Yes it would nice to have this supported for date/time fields as we still want to differentiate the 'todays' records from others, no matter the time.

    Also, When I do 'less than' or 'greater than'  TODAY, with a date/time field it is working fine, as I am also highliting the 'overdue' records..

    Can you please come back to me with a date/release to fix that ? if not, maybe a quick work around? I would prefer to avoid writing code for this ..

    Thank you

    Meryem

  • Also, there are two more behaviors I would like to report :

    1- When the field date/time is 16/12/2015 00:00, it is considered less than TODAY. When it is 16/12/2015 00:01 or any time greater than 00:00, then it is considered greater than TODAY.

    So obviously if the date/time is 16/12/2015 00:00, we still want it to be seen as today and not a past date.

    2- Now let's say this same date/time field is in an Edit or QC page. Let's say the current value is : 16/12/2015 11:18, if I change the date by clicking on any other day in the calendar, the time will not change, which is good.

    But if I click on the footer of the date picker (today s date), as shown in the screen shot below, the time will be updated to 00:00, which is not ideal.

    Is that a known behavior ? Or is there a way we could keep the time unchanged when clicking on that footer?

    Thanks,

    Meryem

  • Adding EQUAL to a date/time field won't help much as it would compare down to the seconds.

    Maybe you can use an expression field to convert the date/time to a date and then assess if date is TODAY.

    I haven't had time to try this, though, so I'm not sure it would work as this is a bit advanced and not sure it was intended to be used that way.

    Let us know.

    Thierry.

  • Hi Thierry,

    Ok for the equal operator makes sense actually. I will use another date field it is fine.

    But can you have a look at my last post where I am  describing two other issues?

    Thanks,

    Meryem

  • for 1. above, I entered TP29803 to track this.  The doc at documentation.progress.com/.../ states: "The value of the TODAY token is 12PM+1ms of the current day in the time zone of the current user for date/time fields; for date fields, its value is either the beginning (for the greater than operation) or the end (for the less than operation) of the current day."  So, we will have to be careful and take some time to evaluate if we can change this behavior.

  • For 2. above, yes this how the Kendo Date time picker works.

    Try it out here: demos.telerik.com/.../index

    and you will see that as soon as you click on today's date at bottom it resets the time to 12:00AM but not when you select a date in the calendar itself.

    What's the issue with this behavior?

  • Thought I would let you know that for 4.0.5, I fixed the coloring so that you can do something like this:
     
    1) date time less than TODAY
    2) date time gt TODAY + 1
     
    Here is an example:
     
    Color definitions:
     
    Here is how it shows:
     
    Thierry.
     
  • Hi Thierry,

    This is nice and solves the problem of extracting the Todays records.

    Thank you

    Meryem

  • Glad to hear that.

    thanks.