UPS battery replacement
Yes, the 7Ah battery should work, but it will provide less energy than the original battery which is better suited for high power discharge.

The weird part about CSB model numbers is that for most series they show the voltage and capacity (GP1272 is 12V 7.2Ah),  but for the HR and HRL series the model number shows the voltage and the power that a single cell can provide for 15 minutes. So, your HR1234W battery can provide 204W (34W/cell * 6 cells) for 15 minutes.

And it's even written on the battery too - 12V 34W/Cell/1.67V/15Min.