Avatar

Level 2

Hello radzmar

thank you so much for your help. But unfortunately it didn't work. I wrote the following code in the rows calculate event:

FormAccount.bdyMain.frmOpenActivities.tblOpenAct.rowOpenAct::calculate - (FormCalc, client)

;Reference date is today minus n days

var refDate = Date() - 182 

if (not CreatedOn.isNull) then

    ;Make row only visible if date in field "CreatedOn" is greater or equal reference date

    if (Date2Num(CreatedOn.formattedValue, "MM/DD/YYYY") ge refDate) then

        $.presence = "visible"

    else

        $.presence = "hidden"

    endif

else

    $.presence = "hidden"

endif

But I still see all the rows. (see figure)

1843762_pastedImage_4.png

Do you know why that might be? Is there perhaps a syntax error in the code, error in the date format or did I choose the wrong calculate event?

Many thanks,

Jeemer