I have a strange requirement that involves changing the headers of columns within an interactive grid from a popup LOV page item without the need to submit/reload the page everytime the parameter changes.
My first thought was to have some javascript code that messes with the headers that gets executed from a Dynamic Action. Here is the code I have so far:
var parts_arr = $v("P200_PARTS_SELECTION").split(':'),
col_staticID_arr = ['#part-1_HDR', '#part-2_HDR', '#part-3_HDR', '#part-4_HDR', '#part-5_HDR',
'#part-6_HDR', '#part-7_HDR', '#part-8_HDR', '#part-9_HDR', '#part-10_HDR'
];
for (let i = 0, len = parts_arr.count; i < len; i++) {
$(col_staticID_arr[i]).text(apex.item("P200_PARTS_SELECTION").displayValueFor(parts_arr[i]));
};
This unfortunately does not work for a few reasons, firstly it seems that I can’t use a variable or even a concated string in the $(...).text
field. Secondly, the displauValueFor(...)
field only seems to pull the display value of P200_PARTS_SELECTION
when it only holds one value.
However I believe I am on the right path because the following line of code DOES successfully change the header of the column:
$('#part-1_HDR').text('TEST');
Any help would be greatly appreciated!