Skip to main content
Question

We would like to have a date range component and save the end date to a variable, based on the date variable have a PQL filter that would refresh the table in a view. I tried to implement it but it is erroring out.

  • July 16, 2024
  • 3 replies
  • 46 views

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.

3 replies

  • Author
  • Level 2
  • July 16, 2024

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%>'}


rita.kiss12
Level 7
Forum|alt.badge.img+3
  • Level 7
  • July 17, 2024

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.


  • Author
  • Level 2
  • July 17, 2024

Date_FilterYes, I am using date variable type.