I am creating a report in Apex 5.1, I have this line in my query, it runs in APEX 4.2 but it is giving an error in APEX 5.1
CASE
WHEN M.STAT_CODE = 10001 THEN
'<a class="btn btn-primary btn-block btn-sm" role="button" href="' || APEX_UTIL.PREPARE_URL( p_url => 'f?p=' || &APP_ID. || ':58:'||&SESSION.||'::NO::P58_TRANS_ID:'||M.TRANS_ID, p_checksum_type => 'SESSION') || '">Edit Idea</a>'
ELSE '<a href="#" class="btn btn-default btn-block btn-sm btn-block disabled" role="button">Edit Idea</a>'
END
ELSE '\<a href="#" class="btn btn-default btn-block btn-sm disabled" role="button">Edit Idea\</a>'
END EDIT\_LINK
I have resolved the error in this way and now it runs in APEX 5.1
CASE
WHEN M.STAT_CODE = 10001 THEN
'<a class="btn btn-primary btn-block btn-sm" role="button" href="' || APEX_UTIL.PREPARE_URL( p_url => 'f?p=' ||v('&APP_ID.') || ':58:'|| v('&APP_SESSION.')||'::NO::P58_TRANS_ID:'||M.TRANS_ID, p_checksum_type => 'SESSION') || '">Edit Idea</a>'
ELSE '<a href="#" class="btn btn-default btn-block btn-sm btn-block disabled" role="button">Edit Idea</a>'
END
ELSE '\<a href="#" class="btn btn-default btn-block btn-sm disabled" role="button">Edit Idea\</a>'
END EDIT\_LINK
,
CASE
But it is not doing what it is supposed to do. In my report it is supposed to add an edit column that is conditional and only available/active to the user who created the record and that the record has not yet started being evaluated by HR Committee. How can I solve this problem?