Forum Discussion

angela's avatar
angela
Catalyst II
6 months ago

How can I filter for created_on date in a MAC Policy rule?

Hi community,

MAC policies allow us to specify item access for certain groups based on properties.

Does anyone know how to filter for the "created_on" property? I only want to show items that are newer than a certain date. Right now I have the following rule:

CurrentUser.IsMemberOf('Administrators')
AND (CurrentItem.ai_test_result = 1)
AND (CurrentItem.created_on > '2025-05-05T00:00:00')

"ai_test_result" is a custom property that I added to the PolicyAccessItem. This filter works. But the created_on filter is ignored. What could be wrong?

Thanks!
Angela

3 Replies

  • Short update: For some reason the filter seems to work when I use '2025-05-05T05:00:00' as date, but it doesn´t work when I use '2025-05-05T01:00:00'.

    When using T01 and T00 most of my items are filtered that don´t fit into the date range. But the result is one month off. I get all values from April too! When I use T05, I got the correct filtering for May only. 

    What is happening??!? I am very confused. 

     

    EDIT: When I change the filter to AND (CurrentItem.created_on > '2025-04-10T05:00:00') I don´t get not a single result anymore. Instead of getting more items, suddenly everything is restricted. 
    The same created_on filters work perfectly fine in a regular AML search in the SearchGrid. 

    Is there some parsing error going on?

     

     

     

  • Update: There are definitely some issues with the date parsing!

    My previous filter worked more or less for certain dates. I now tried some complete different dates and this time I even got an error message that doesn´t appear before:

    AND (CurrentItem.created_on > '2025-09-15')
    OR
    AND (CurrentItem.created_on > '2025-09-15T05:00:00')

    resulted in:

    -> Converting a nvarchar data type to a datetime data type resulted in a value that is out of range.

    I use Innovator 12, does anyone know if this one is a know behavior and fixed already?

  • Dates in MAC Policies seem to work more reliable in Release 35. Does anyone know in which version Aras fixed the issue?

    I maybe found a workaround for I12, but I want to avoid to be forced to use it.