Reputation: 35547
I am using Oracle APEX 5.1.2 and Oracle 11g R2.
I have a top region where the user select from a select list and based on the selection returns an IG report of records for that selection.
Within the IG, I have several report columns but I also have a column that is a HTML Expression type (button), i.e.:
<button id="edit-btn" type="button" class="t-Button t-Button--icon t-Button--iconLeft"><span aria-hidden="true" class="t-Icon t-Icon--left fa fa-edit"></span>Edit</button>
Based on another column value within this same IG report, column name "Key", if this has a value within it, I would like to enable the HTML Expression (button column above) for that row where the "Key" value is not null otherwise I would like the button disabled for that row.
I obviously want this rule to apply to each row of the IG report based on whether the "Key" value is null or not null.
I would like this triggered for all rows, based on the top region select list value.
Upvotes: 0
Views: 1585
Reputation: 585
You can try following.
1) Add another column to check for "Key". Something like,
case
when key is not null
then '<button id="edit-btn" type="button" class="t-Button t-Button--icon t-Button--iconLeft">
<span aria-hidden="true" class="t-Icon t-Icon--left fa fa-edit"></span>Edit</button>'
else ''
end as Edit
2) In column attributes, set Escape special characters to no
So, the above added column will check if "key" has value then, it will add button. Otherwise it will not be added.
Upvotes: 1