LPS-34506 - Add variable conditionals to make macros more flexible