<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Output as constant in Decision rule</title><link>https://community.appian.com/discussions/f/rules/39788/output-as-constant-in-decision-rule</link><description>I have a requirement where similar nested if conditions are required in multiple interfaces. So I&amp;#39;m trying to build a decision rule so that if there is any update required it can be done in the rule and it can reflect in all interfaces. But the outputs</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Output as constant in Decision rule</title><link>https://community.appian.com/thread/151787?ContentTypeID=1</link><pubDate>Mon, 29 Sep 2025 09:56:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7cc0eb2f-c91d-42b6-b5fb-01cb1626d67a</guid><dc:creator>Shubham Aware</dc:creator><description>&lt;p&gt;You cannot reference constants directly in Decision Table outputs. Your a!match() expression rule is the correct approach for this scenario.&lt;br /&gt;Or&lt;br /&gt;Create a decision rule that outputs a simple key (&amp;quot;cond1&amp;quot;, &amp;quot;cond2&amp;quot;), then create an expression rule with logic like:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;if(
  rule!decisionRule(param) = &amp;quot;cond1&amp;quot;,
  cons!constant_1,
  rule!decisionRule(parameters) = &amp;quot;cond2&amp;quot;,
  cons!constant_2,
  {}
)
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Output as constant in Decision rule</title><link>https://community.appian.com/thread/151785?ContentTypeID=1</link><pubDate>Mon, 29 Sep 2025 07:32:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d2797d06-e2d1-4742-a262-db27d3b102dd</guid><dc:creator>Harsha Sharma</dc:creator><description>&lt;p&gt;In Decisions directly constants cannot be referred. A simpler way to get desired result is in the Decision&amp;#39;s output have the decision object return 1 or 2 simply. Not the values from constant rather just a pointer to which constant you need. Like this&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/15/pastedimage1759131171578v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Wherever you call this decision rule, add an if() so that if decision rule returns 1 constant 1 is referred (order will be maintained and handled future changes in constant too), if 2 is returned constant 2 is referred. Basically move the constant out of the decision rule and just work on conditions there.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>