<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title>www.ritlabs.com [Topic: Problem with %IF macro]</title>
		<link>http://www.ritlabs.com</link>
		<description>New posts in Problem with %IF macro of  forum at www.ritlabs.com [www.ritlabs.com]</description>
		<language>en</language>
		<docs>http://backend.userland.com/rss2</docs>
		<lastBuildDateTag>Wed, 05 Jul 2006 20:53:45 +0300</lastBuildDateTag>		<item>
			<title>Problem with %IF macro</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic3234/message12722/">Problem with %IF macro</a></b> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			Argghh! &nbsp;Here I was trying all sorts of fancy stuff, and it turns out that I was just mis-spelling %ABToCompany!! (In weak defence, I was also doing some stuff with SAS, which uses "&" for macro variables.) &nbsp;Changed the "&" to "%" and everything worked fine. &nbsp;Many many thanks for finding such an embarrasing error. &nbsp;Cheers, --Howard <br />
			<i>05 July 2006 20:53:45, <a href="http://www.ritlabs.com/en/forums/">Howard Cherniack</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic3234/message12722/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic3234/message12722/</guid>
			<pubDate>Wed, 05 Jul 2006 20:53:45 +0300</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>Problem with %IF macro</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic3234/message12720/">Problem with %IF macro</a></b> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			You're using a mix of single quote marks and double quote marks in the last if statement, change the all to double quote marks. Also you're using &ABToCompany in stead of %ABToCompany.<br /><br />Change your template into:<br /><br />You are%IF:"%ABToBusFax"&lt;&gt;"":"":" not" registered for the Writing Master Class.<br />You are%IF:"%ABToBusPager"&lt;&gt;"":"":" not" registered for the Writers' Workshop.<br /><br />%IF:"%ABToCompany"="":"%-":"<br />You are registered with a Dealer-room table in<br />the name of %ABToCompany.<br /><br />"<br /> <br />
			<i>05 July 2006 20:45:59, <a href="http://www.ritlabs.com/en/forums/">Roelof Otten</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic3234/message12720/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic3234/message12720/</guid>
			<pubDate>Wed, 05 Jul 2006 20:45:59 +0300</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>Problem with %IF macro</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic3234/message12717/">Problem with %IF macro</a></b> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			As Registrar for a science-fiction convention (<noindex><a href="http://www.vcon.ca" target="_blank" rel="nofollow">V-Con 31</a></noindex>), I want to send a confirmation message to each of our members. &nbsp;The membership records are kept in Excel; I exported the list from Excel and imported it into the TB! address book, using some of the address-book fields to hold some special values in the spreadsheet. &nbsp;Generally, the template comes out pretty well, but I'm having trouble with a part of it:<br /><br /> ------------------------<br />You are%IF:"%ABToBusFax"&lt;&gt;"":"":" not" registered for the Writing Master Class.<br />You are%IF:"%ABToBusPager"&lt;&gt;"":"":" not" registered for the Writers' Workshop.<br /><br />%IF:'&ABToCompany'='':"%-":"<br />You are registered with a Dealer-room table in<br />the name of %ABToCompany.<br /><br />"<br /> -------------------------------<br /><br />The first couple of lines ("You are/are not registered...") come out fine--if the respective fields are blank, the "not" prints, if not, not.<br /><br />The part about the Dealer-room table, however, <B>always</B> prints, even if %ABToCompany is blank. &nbsp;I've tried various combinations of single and double quotes, ="" and &lt;&gt;"", including a blank like before the final quote mark and not, using "%-" and not; "You are registered with a Dealer-room table in the name of " always prints, with a name when %ABToCompany is non-blank, and empty when it is.<br /><br />Can anyone tell me what I'm doing wrong here, or give me some pointers on how to do it right? &nbsp;I simply want to print that "You are registered..." paragraph, and the following blank line, if and only if %ABToCompany is non-blank. &nbsp;(Even better would be if I could get the line to wrap correctly, ignoring the space taken up by the macro stuff, which causes wrapping in the template. &nbsp;But that's minor.) &nbsp;Many thanks. &nbsp;--Howard <br />
			<i>05 July 2006 20:35:12, <a href="http://www.ritlabs.com/en/forums/">Howard Cherniack</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic3234/message12717/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic3234/message12717/</guid>
			<pubDate>Wed, 05 Jul 2006 20:35:12 +0300</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
	</channel>
</rss>
