select
    case
    when d.submitted_by = :APP_USER then
        '<a href="' || 
            apex_page.get_url(
                p_page => 4
                , p_clear_cache => 4
                , p_items => 'P4_ID'
                , p_values => d.id
            ) || 
        '"><span aria-label="&#x7DE8;&#x96C6;"><span class="fa fa-edit" aria-hidden="true" title="&#x7DE8;&#x96C6;"></span></span></a>'
    else
        null
    end id
    ,d.name
    ,d.body_filename filename
    ,l.external_key
from exc_links_vw l
    join exc_documents d on l.document_id = d.id
    join exc_acls a on l.id = a.link_id
    join exc_credentials_vw c on a.credential_id = c.id
where c.username = :APP_USER