No, you should have:
${SQL:Select App from APM_ApplicationCustomProperties ACP JOIN APM_AlertsAndReportsData A on ACP.ApplicationID = A.ApplicationID Where A.ComponentID = ${ApplicationID}}
And it should work with your Application Alerts. For the component alerts you want:
${SQL:Select App from APM_ApplicationCustomProperties ACP JOIN APM_AlertsAndReportsData A on ACP.ApplicationID = A.ApplicationID Where A.ComponentID = ${ComponentID}}
Hardware would be a bit trickier though, as those aren't linked to applications as component are, so I'm not sure you can pass application custom properties for those. You may have to use a Node custom property on that one.