'Office365 email signature - conditionally show HTML if tag contains a value

I'm adding a company wide email signature in the Office 365 Admin area under Rules - Mailflow > Apply Disclaimers. I am then using their tags such as %%FirstName%% and %%LastName%% to insert the users details into the signature.

Is it possible to conditionally show HTML depending on whether a tag has a value? E.g. I want to show a pipe character (|) if the %%MobileNumber%% tag has a value. How do I check if that tag has a value?



Solution 1:[1]

Ideally, for that you could use a JavaScript code or CSS. For example, see Check if an element is visible on screen and Conditionally hide div based on if element is present on page for more information. But Outlook doesn't run any JavaScript code in the message body for security reasons. Moreover, not all CSS properties are supported in Outlook for desktop due to the fact that Word is used as an email editor. So, there is no way.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Eugene Astafiev