Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

data-* attribute and classic report (cards template)

Eslam_ElbyalyMar 16 2019 — edited Mar 17 2019

Hi,

Apex 18.2.

I have a classic report region with a static id= "CAT" based on cards template. It has a column "ID". And I need to get it's value. So, I tried adding data-id="#ID#" to "column formatting> HTML expression" attribute and used an onClick dynamic action on the jquery selector "#CAT li" to execute the following javaScript code,

var v_cat_id = $(this.triggeringElement).data("id");

alert(v_cat_id);

it shows "undefined". However when I use a copy of the template and add "#CARD_ATTRIBUTES#" substitution string and add

data-id="#ID#" to "column formatting> HTML expression" attribute and used an onClick dynamic action on the jquery selector "#CAT li" to execute the following javaScript code,

var v_cat_id = $(this.triggeringElement).data("id");

alert(v_cat_id);

it shows the needed value without any problem.

Why is that happening? Can not I add data-* attribute to any column of a classic report?

Comments
Post Details
Added on Mar 16 2019
1 comment
3,019 views