I am using ApEx 3.2.1 and cant upgrade for a few months
Using javascript - is it possible to programatically get the column name that a field is based on ?
For example, I have a report based on ...
SELECT id, name, city || ' ' ||postcode city_description
from employees
This shows a tabular list of records in a report region on an ApEx page.
So far I have been using code like this to get the fields.
var FEmployeeNameField = document.getElementsByName('f02');
var FCityDescriptionField = document.getElementsByName('f03');
This is not stable as the field number will change if another column is added to the query.
It will also change if I change the report column attribute from "Text (Saves Stat)e" to "Standard Report Column" as standard report columns do not appear in the elements list
I would like to find a function that lets me get the field based on the column name or column alias, similar to this
var FEmployeeNameField = document.getElementsByColumnName('NAME);
var FCityDescriptionField = document.getElementsByColumnName('CITY_DESCRIPTION');
I hope that makes sense
Thank you for any assistance that you can offer.
Steve B