<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[if statement]]></title><description><![CDATA[<p dir="auto">hi,</p>
<p dir="auto">i am trying to right a very simple transform script which will take the $1 variable and change it's value to "yes" if it is equal to 1 and "no" if it is equal to 2.<br />
i can get through the first comparison but other then that nothing works and the user manual does not help.</p>
<p dir="auto">10x,<br />
lindeamon</p>
]]></description><link>https://forum.netxms.org/topic/1314/if-statement</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 10:37:51 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/1314.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 21 Aug 2011 15:44:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to if statement on Mon, 22 Aug 2011 07:13:34 GMT]]></title><description><![CDATA[<p dir="auto">thank you victor,<br />
i kind of solved it myself yesterday with if loops but your answer taught me cleaner ways.</p>
<p dir="auto">regards,<br />
lindeamon</p>
]]></description><link>https://forum.netxms.org/post/5791</link><guid isPermaLink="true">https://forum.netxms.org/post/5791</guid><dc:creator><![CDATA[lindeamon]]></dc:creator><pubDate>Mon, 22 Aug 2011 07:13:34 GMT</pubDate></item><item><title><![CDATA[Reply to if statement on Sun, 21 Aug 2011 21:05:47 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">Script for this cold looks like following:</p>
<pre><code>if ($1 == 1)
   return "yes";
if ($1 == 2)
   return "no";
return "neither_yes_or_no";
</code></pre>
<p dir="auto">or, using switch operator:</p>
<pre><code>switch($1)
{
   case 1:
      return "yes";
   case 2:
      return "no";
   default:
      return "neither_yes_or_no";
}
</code></pre>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/5790</link><guid isPermaLink="true">https://forum.netxms.org/post/5790</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Sun, 21 Aug 2011 21:05:47 GMT</pubDate></item></channel></rss>