
#orclapex IR Hide specific column when exporting to CSV. @martindsouza has the solution https://t.co/GqyidZgINF Just to simple to be true!— Tobias Arnhold (@tobias_arnhold) January 10, 2017
In my case I needed some username columns to be displayed during run-time but only exportable for administrators. The export itself was made with the default APEX CSV export.
Martin solutions was a really good starting point. I just had to add some security checks for the administrator role. And all together was put into a new authorization scheme which I added inside the conditional columns of my Interactive Report.
-- Authorization Scheme Name: ROLE_EXPORT_USERNAME
-- Validate authorization scheme: Once per page view
-- Code:
if pkg_security.has_user_role(:APP_USER,'ADMIN') = true or :REQUEST != 'CSV' then
return true;
else
return false;
end if;