Forum Discussion

Ion-vlad Orascu's avatar
Ion-vlad Orascu
Copper Contributor
Jul 08, 2019

hide fields in Office 365 signature if there are empty

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:

 

 

 

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

  • 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%%

    • Ion-vlad Orascu's avatar
      Ion-vlad Orascu
      Copper Contributor

      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%%

       

      • VasilMichev's avatar
        VasilMichev
        MVP

        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.