Hello,
I'm using Apex 21.2 on a 21.c database.
I have an interactive grid which works fine. The source is a single table and the source code for the IG is:
select ROWID,
PRIM_KEY,
EVENT_FKEY,
CONTACT_FKEY,
ATTENDANCE_TYPE,
COMMENTS
from VOL_ATTENDANCE
The Event_fkey and Contact_fkey are defined as Popup LOV's.
The Contact_Fkey field source is:
Type = SQL Query
SQL Query =
Select first_name || ' ' || last_name display,
prim_key return
From vol_contact
Order by last_name;
Again, this all works well. However, I'd like to sort my report so that it's sorted by two columns: Event and then Last Name.
The problem is that the IG's Action / Data / Sort doesn't list the Last_name column, naturally.
I tried to augment the Interactive Grid's SQL to the following:
select va.PRIM_KEY,
va.EVENT_FKEY,
va.CONTACT_FKEY,
va.ATTENDANCE_TYPE,
va.COMMENTS,
vc.last_name,
vc.first_name
from VOL_ATTENDANCE va
, VOL_CONTACT vc
where va.contact_fkey = vc.prim_key
That works, but the Action / Data / Sort doesn't list the Last_Name or First_name as a choice.
How can I adjust this Interactive Grid so that I can sort by Event_FKEY and Last_NAME ?