Skip to main content

The PQL statement is FILTER ("ACDOCA_AP_SUSPENSE"."AUGBL" IS NULL OR "ACDOCA_AP_SUSPENSE"."AUGDT" >  {d '2024-06-02'}) AND  "ACDOCA_AP_SUSPENSE"."BUDAT" <=  {d '2024-06-02'};

The above PQL statement works fine when I hardcode the date.

 

I have created a date variable in a view(Is it possible to default it to the current date?). I want the user to select a date from the date range component, the date variable gets updated from the END date of the Date range and the PQL statement gets executed based on the selected date. But for some reason, it does not work for me.

 

The PQL Statement is FILTER ("ACDOCA_AP_SUSPENSE"."AUGBL" IS NULL OR "ACDOCA_AP_SUSPENSE"."AUGDT" >  {d '<%date_filter%>'}) AND  "ACDOCA_AP_SUSPENSE"."BUDAT" <=  {d '<%date_filter%>'};

 

The error I get is attached in a screenshot.

Any suggestions on fixing this or alternative solutions would be appreciated.

The filter we are using is : FILTER ("ACDOCA_AP_SUSPENSE"."AUGBL" IS NULL OR "ACDOCA_AP_SUSPENSE"."AUGDT" >  {d '<%=date_filter%>'}) AND  "ACDOCA_AP_SUSPENSE"."BUDAT" <=  {d '<%=date_filter%>'}


What type of variable date_filter is? It looks like the error message complains about the invalid date or format. I would check if the date_filter has the type date.

Or, maybe an object type variable if you want to load the dates from somewhere - in that case make sure the format is correct.


Date_FilterYes, I am using date variable type.


Reply