Solved

Is it possible to make a custom field that lists true or false if another date column is less then the sysdate?

  • 11 November 2022
  • 2 replies
  • 149 views

Badge +3

I want to make a custom field that will be sortable and just list True or False if the Phase Out Date for the row is less then sysdate, is that possible?

 

icon

Best answer by Technical Outlaws 11 November 2022, 17:32

View original

2 replies

Userlevel 5
Badge +11

Create a read-only custom field that uses a similar SQL statement as below, I just picked revised_due_date as an example.  Just define the bind variables in the SQL arguments to complete the set up.

SELECT 
   CASE WHEN (revised_due_date < SYSDATE) THEN
      'TRUE'
   ELSE
      'FALSE'
   END
FROM SHOP_ORD
WHERE order_no = :order_no
AND release_no = :release_no
AND sequence_no = :sequence_no

Badge +3

That worked, thanks for the help!

Reply