Privacy Policy

J.R.
  • J.R.
  • Member Topic Starter
2010-09-30T18:49:13Z
OK, so my client wants to change up a bit. They like the idea of a 'business card' style block. The problem is that they have multiple offices, and some people work from more than one office. I'd like to be able to add a second card with their alternate address, based on if that field in AD has anything in it. Is there a way for the second block below to only show up if the field isn't blank? As always, many thanks!

<br><br>

<span style="FONT-SIZE: 8pt; COLOR: rgb(165,165,165); FONT-FAMILY: 'Ariel'" >{#Print Class="OA" Name="company" Pattern=".+" IfMatch="$*<br>"}</span>

<br>

<table width="330" border="2" cellpadding="0" cellspacing="0">

<tr>

<td width="115"><div align="left"><A HREF="http://www.domain.com/"><img src="inline:picture.bmp" BORDER="0"></a></div></td>

<td width="215">

<font face="Arial" size="2" color="#888888">

<b>{#Print Class="OA" Name="displayName"}</b><br>

</font>

<font face="Arial" size="1" color="#999999">

<i>{#Print Class="OA" Name="title" Pattern=".+" IfMatch="$*"}</i><br><br>

{#Print Class="OA" Name="streetAddress"}<br>

{#Print Class="OA" Name="postOfficeBox" Pattern=".+" IfMatch=", $* ,"}

{#Print Class="OA" Name="l"}, {#Print Class="OA" Name="st"} {#Print Class="OA" Name="postalCode"} <br>

{#Print Class="OA" Name="telephoneNumber" Pattern=".+" IfMatch="Main: $*"}<br>

{#Print Class="OA" Name="homePhone" Pattern=".+" IfMatch="Direct: $*"}<br>

{#Print Class="OA" Name="mobile" Pattern=".+" IfMatch="Cell: $*"}<br>

Fax: {#Print Class="OA" Name="facsimileTelephoneNumber"}<br>

Email: <a href="mailto:{#Print Class="OA" Name="mail"}">{#Print Class="OA" Name="mail"}</a><br>

</font>

</td>

</tr>

</table>

<br>

REM Only show from here down if the field 'info' isn't blank

<table width="330" border="2" cellpadding="0" cellspacing="0">

<tr>

<td width="115"><div align="left"><A HREF="http://www.domain.com/"><img src="inline:picture.bmp" BORDER="0"></a></div></td>

<td width="215">

<font face="Arial" size="2" color="#888888">

<b>{#Print Class="OA" Name="displayName"}</b><br>

</font>

<font face="Arial" size="1" color="#999999">

<i>{#Print Class="OA" Name="title" Pattern=".+" IfMatch="$*"}</i><br><br>

{#Print Class="OA" Name="info" Pattern=".+" IfMatch="$*"}<br>

{#Print Class="OA" Name="postOfficeBox" Pattern=".+" IfMatch=", $* ,"}

{#Print Class="OA" Name="l"}, {#Print Class="OA" Name="st"} {#Print Class="OA" Name="postalCode"} <br>

{#Print Class="OA" Name="telephoneNumber" Pattern=".+" IfMatch="Main: $*"}<br>

{#Print Class="OA" Name="homePhone" Pattern=".+" IfMatch="Direct: $*"}<br>

{#Print Class="OA" Name="mobile" Pattern=".+" IfMatch="Cell: $*"}<br>

Fax: {#Print Class="OA" Name="facsimileTelephoneNumber"}<br>

Email: <a href="mailto:{#Print Class="OA" Name="mail"}">{#Print Class="OA" Name="mail"}</a><br>

</font>

</td>

</tr>

</table>

<br>

J.R.
  • J.R.
  • Member Topic Starter
2010-09-30T18:51:13Z
BTW, as you can see, I get how to do it with an individual field. But some of these will be populated even if they don't have a second address. I need the whole section to be hidden based on one field, if it's possible. Thanks again!
franzk
2010-09-30T19:41:05Z
>BTW, as you can see, I get how to do it with an individual field. But some of these will be populated even if they don't have a second address. I need the whole section to be hidden based on one field, if it's possible. Thanks again!

You can use the feature of nested print directives, which is available since v4.2, to implement conditional text inclusion based on the value of another attribute. The following text is taken from the documentation and also includes an example:

------------------------------------

Nested Print Directives

Starting with version 4.2, DisclaimIt supports one level of nested print directives, this means that the value string of any parameter (except Class) of a print directive at the main level can contain one or more nested print directives. This allows for very complex usage scenarios because the parameters of a print directive at the main level can be be dynamically constructed at runtime.

Example:

You want to print the value of the originator attribute mobile but only if the originator attribute pager is not empty, otherwise do not print the value of the originator attribute mobile.

{#Print Class="OA" Name="{#Print Class="OA" Name="pager" Pattern=".+" IfMatch="mobile"}" Pattern=".+" IfMatch="Mobile: $&"}

-------------------------------

-Franz

J.R.
  • J.R.
  • Member Topic Starter
2010-09-30T20:41:35Z
Thanks! I will see if I can get it going with this info. Much Appreciated!