hide fields in Office 365 signature if there are empty

%3CLINGO-SUB%20id%3D%22lingo-sub-742059%22%20slang%3D%22en-US%22%3Ehide%20fields%20in%20Office%20365%20signature%20if%20there%20are%20empty%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-742059%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20all%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20using%20dynamically%20attached%20signature%20in%20Office%20365%20though%20a%20rule%2C%20where%20I%26nbsp%3Bappend%20the%20disclaimer.%3C%2FP%3E%3CP%3EBut%20not%20all%20users%20have%20phone%20numbers%20filled%20in.%3C%2FP%3E%3CP%3ESi%20signature%20looks%20like%20this%3A%3C%2FP%3E%3CP%3EFirst%20name%2C%20last%20name%3C%2FP%3E%3CP%3EDirect%20Phone%3A%3C%2FP%3E%3CP%3EMobile%3A%3C%2FP%3E%3CP%3EAddress%3A%20complete%20address%3C%2FP%3E%3CP%3Ewebsite%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20script%20looks%20like%20this%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20672px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F122517iACE12BF0857B1291%2Fimage-dimensions%2F672x337%3Fv%3D1.0%22%20width%3D%22672%22%20height%3D%22337%22%20alt%3D%22aaaa.PNG%22%20title%3D%22aaaa.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20a%20way%20to%20detect%20if%20the%20user%20does%20not%20have%20a%20phone%20entered%2C%20that%20the%20phone%20field%20is%20skipped%20entirely%3F%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20instead%20of%20showing%20Phone%3A%20%2C%26nbsp%3B%20do%20not%20show%20this%20at%20all%20if%20there%20is%20no%20phone%20number%20there.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-742059%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-742408%22%20slang%3D%22en-US%22%3ERe%3A%20hide%20fields%20in%20Office%20365%20signature%20if%20there%20are%20empty%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-742408%22%20slang%3D%22en-US%22%3E%3CP%3EYou%20can%20use%20%25%25%20variable%20attributes.%20This%20is%20a%20snippet%20of%20mine%3A%3CBR%20%2F%3E%3CSPAN%3E%3CB%3EE%3A%3C%2FB%3E%20%25%25email%25%25%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22%26quot%3Bddi%26quot%3B%22%20data-hide%3D%22%26quot%3B%25%25PhoneNumber%25%25%26quot%3B%22%3E%3CB%3EDDI%3A%3C%2FB%3E%20%25%25PhoneNumber%25%25%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3EIn%20your%20case%2C%20variables%20you%20can%20use%20are%20as%20follows%3A%3CBR%20%2F%3E%25%25displayname%25%25%3CBR%20%2F%3E%25%25PhoneNumber%25%25%3CBR%20%2F%3E%25%25title%25%25%3CBR%20%2F%3E%25%25company%25%25%3CBR%20%2F%3E%25%25street%25%25%3CBR%20%2F%3E%25%25city%25%25%2C%20%25%25state%25%25%20%25%25zipcode%25%25%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-742461%22%20slang%3D%22en-US%22%3ERe%3A%20hide%20fields%20in%20Office%20365%20signature%20if%20there%20are%20empty%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-742461%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F174201%22%20target%3D%22_blank%22%3E%40Rhys%20Williams%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHello%20Rhys%3C%2FP%3E%3CP%3EThank%20you%20for%20the%20update.%3C%2FP%3E%3CP%3EYes%2C%20I%20can%20use%20that%20but%20the%20issue%20is%20that%20for%20example%26nbsp%3B%20in%20this%20case%20all%20elements%20will%20be%20inserted%20in%20the%20disclaimer%2C%20all%205%20of%20them%2C%20even%20though%20let's%20say%20the%20user%20does%20not%20have%20a%20company%20phone%2C%20therefor%20no%20phine%20number.%20In%20this%20case%2C%20I%20need%20to%20make%20it%20not%20display%20the%20phone%20field.%3C%2FP%3E%3CP%3E%3CSPAN%3E%25%25displayname%25%25%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSTRONG%3E%3CEM%3E%25%25PhoneNumber%25%25%3C%2FEM%3E%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSPAN%3E%25%25title%25%25%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%25%25company%25%25%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%25%25street%25%25%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%25%25city%25%25%2C%20%25%25state%25%25%20%25%25zipcode%25%25%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-742469%22%20slang%3D%22en-US%22%3ERe%3A%20hide%20fields%20in%20Office%20365%20signature%20if%20there%20are%20empty%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-742469%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F36125%22%20target%3D%22_blank%22%3E%40Ion-vlad%20Orascu%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAdd%20this%20part%20into%20the%20html%20element%20as%20below%3A%3CBR%20%2F%3E%3CSPAN%20class%3D%22%26quot%3Bddi%26quot%3B%22%3E%3CSTRONG%3Edata-hide%3D%22%25%25PhoneNumber%25%25%22%3C%2FSTRONG%3E%26gt%3B%3CB%3EDDI%3A%3C%2FB%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnything%20inside%20the%20%3CSPAN%3E%20that%20reflects%20what%20is%20in%20the%20data-hide%20attribute%20will%20be%20hidden%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-742969%22%20slang%3D%22en-US%22%3ERe%3A%20hide%20fields%20in%20Office%20365%20signature%20if%20there%20are%20empty%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-742969%22%20slang%3D%22en-US%22%3E%3CP%3EYou%20cannot%20have%20such%20granularity%20with%20the%20built-in%20functionality%2C%20it's%20very%20limited.%20You're%20better%20off%20looking%20for%20third-party%20tools%20that%20specialize%20in%20signature%20management.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-744197%22%20slang%3D%22en-US%22%3ERe%3A%20hide%20fields%20in%20Office%20365%20signature%20if%20there%20are%20empty%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-744197%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F58%22%20target%3D%22_blank%22%3E%40Vasil%20Michev%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20the%20other%20person%20said%20might%20work%20for%20single%20users%2C%20but%20I%20can't%20create%20transport%20rules%20to%20add%20disclaimers%20for%20each%20individual%20person%2C%20I%20have%20hundreds%20of%20users%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-754632%22%20slang%3D%22en-US%22%3ERe%3A%20hide%20fields%20in%20Office%20365%20signature%20if%20there%20are%20empty%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-754632%22%20slang%3D%22en-US%22%3EWe%20have%2015%2C000%20users%20and%20around%2020%20disclaimer%20rules%20configured%20to%20apply%20based%20on%20a%20user's%20group%20membership.%3CBR%20%2F%3E%3CBR%20%2F%3EWhat%20i've%20specified%20should%20work%20in%20your%20scenario%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-756426%22%20slang%3D%22en-US%22%3ERe%3A%20hide%20fields%20in%20Office%20365%20signature%20if%20there%20are%20empty%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-756426%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F174201%22%20target%3D%22_blank%22%3E%40Rhys%20Williams%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20Rhys%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20facing%20this%20issue%2C%20not%20all%20have%20company%20phones.%20So%20those%20who%20do%20not%20have%20an%20empty%20field%20in%20the%20signature%2C%20this%20looks%20bad%20for%20people.%26nbsp%3B%20Creating%20a%20special%20group%20for%20these%20persons%20seems%20like%20a%20plan%2C%20I'll%20give%20it%20some%20thoughts.%20To%20create%20a%20group%20for%20those%20who%20do%20not%20have%20phones.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMany%20thanks%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-756445%22%20slang%3D%22en-US%22%3ERe%3A%20hide%20fields%20in%20Office%20365%20signature%20if%20there%20are%20empty%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-756445%22%20slang%3D%22en-US%22%3EYou%20could%20do%20the%20data-hide%20item%20i%20specified%20above%20however%20just%20not%20label%20it%20with%20%22Telephone%3A%22%20so%20effectively%20it%20is%20just%20their%20number%20on%20its%20own%20in%20the%20signature%20and%20if%20it%20doesnt%20exist%20it'll%20just%20show%20as%20white%20space%3F%3CBR%20%2F%3E%3CBR%20%2F%3EIdeally%20what%20you%20want%20is%20an%20%22if%20doesnt%20exist%20do%20this%22%20type%20thing%20however%20I%20don't%20think%20that's%20possible%20without%203rd%20party.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1837852%22%20slang%3D%22en-US%22%3ERe%3A%20hide%20fields%20in%20Office%20365%20signature%20if%20there%20are%20empty%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1837852%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F174201%22%20target%3D%22_blank%22%3E%40Rhys%20Williams%3C%2FA%3E%26nbsp%3BDid%20you%20ever%20get%20this%20working%20to%20hide%20fields%3F%20If%20so%20can%20you%20help%26nbsp%3B%20me%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

Hello all,

 

I am using dynamically attached signature in Office 365 though a rule, where I append the disclaimer.

But not all users have phone numbers filled in.

Si signature looks like this:

First name, last name

Direct Phone:

Mobile:

Address: complete address

website

 

The script looks like this:

 

aaaa.PNG

 

 

Is there a way to detect if the user does not have a phone entered, that the phone field is skipped entirely? 

So instead of showing Phone: ,  do not show this at all if there is no phone number there.

 

Thank you  

9 Replies
Highlighted

You can use %% variable attributes. This is a snippet of mine:
<span><b>E:</b> %%email%%</span><br/>
<span class="ddi" data-hide="%%PhoneNumber%%"><b>DDI:</b> %%PhoneNumber%%</span><br/>

In your case, variables you can use are as follows:
%%displayname%%
%%PhoneNumber%%
%%title%%</br>
%%company%%
%%street%%
%%city%%, %%state%% %%zipcode%%

Highlighted

@Rhys Williams 

Hello Rhys

Thank you for the update.

Yes, I can use that but the issue is that for example  in this case all elements will be inserted in the disclaimer, all 5 of them, even though let's say the user does not have a company phone, therefor no phine number. In this case, I need to make it not display the phone field.

%%displayname%%
%%PhoneNumber%%
%%title%%</br>
%%company%%
%%street%%
%%city%%, %%state%% %%zipcode%%

 

Highlighted

@Ion-vlad Orascu 

 

Add this part into the html element as below:
<span class="ddi" data-hide="%%PhoneNumber%%"><b>DDI:</b>

 

Anything inside the <span> that reflects what is in the data-hide attribute will be hidden

Highlighted

You cannot have such granularity with the built-in functionality, it's very limited. You're better off looking for third-party tools that specialize in signature management.

Highlighted

@Vasil Michev 

 

Thank you

 

What the other person said might work for single users, but I can't create transport rules to add disclaimers for each individual person, I have hundreds of users 

Highlighted

I have managed to configure around 20 disclaimer rules configured to apply based on a user's group membership. We have 15,000 users who all need signatures and this method works, what're you seeing?

Highlighted

@Rhys Williams 

 

Hi Rhys

 

I am facing this issue, not all have company phones. So those who do not have an empty field in the signature, this looks bad for people.  Creating a special group for these persons seems like a plan, I'll give it some thoughts. To create a group for those who do not have phones. 

 

Many thanks 

Highlighted
You could do the data-hide item i specified above however just not label it with "Telephone:" so effectively it is just their number on its own in the signature and if it doesnt exist it'll just show as white space?

Ideally what you want is an "if doesnt exist do this" type thing however I don't think that's possible without 3rd party.
Highlighted

@Rhys Williams Did you ever get this working to hide fields? If so can you help  me?