SELECT NVL(logat.new_value, logat.old_value) IFS_USER,
       ifsapp.Fnd_User_API.Get_Description(NVL(logat.new_value,
                                               logat.old_value)) User_Name,
       hist.Username,
       
       DECODE(history_type, 'Insert', 'Log On', 'Delete', 'Log Off') AS Action,
       hist.time_stamp

  FROM ifsapp.history_log_attribute logat, ifsapp.history_log hist

 WHERE hist.log_id = logat.log_id
      
   AND column_name = 'DIRECTORY_ID'
      
   AND ifsapp.Report_SYS.Parse_Parameter(NVL(logat.new_value,
                                             logat.old_value),
                                         NVL('&Identity',
                                             '%')) = 'TRUE'
      
   AND hist.time_stamp >= to_date('&DATE_FROM', 'YYYY-MM-DD')
 ORDER BY NVL(logat.new_value, logat.old_value), hist.time_stamp ASC

 -- Lov reference is removed due to limitations in IFS cloud