<?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>To get the condition ri!age&amp;lt;18</title><link>https://community.appian.com/discussions/f/general/40001/to-get-the-condition-ri-age-18</link><description>I have the following requirement: 
 
 In the backend table called conditions I have the columns called operator and value which have the values &amp;lt; and 18 
 
 I need to check the condition if the incoming is age is less than 18 then display true 
 
 That</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: To get the condition ri!age&lt;18</title><link>https://community.appian.com/thread/152696?ContentTypeID=1</link><pubDate>Thu, 04 Dec 2025 19:37:43 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:abcb110c-aa93-4826-a573-affe8e0591b2</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Small nitpick, now that we have a!match(), i think we should consider the legacy function &amp;quot;choose()&amp;quot; as deprecated, since match() is more flexible, offers more code clarity, and has the ability to not error on an invalid index passed.&amp;nbsp; plus, you wouldn&amp;#39;t have to bend over backwards to turn the list of operators into a positional index, but could instead directly address each operator.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;a!localVariables(
  /* Simulate query record output from conditions table */
  local!conditionData: a!map(
    operator: &amp;quot;&amp;lt;&amp;quot;,
    value: 18
  ),

  /* Your incoming age */
  local!age: 20,
  /*ri!age, */

  /* Evaluate condition dynamically */
  local!result: a!match(
    value: local!conditionData.operator,
    
    equals: &amp;quot;&amp;lt;&amp;quot;,  then: local!age &amp;lt; local!conditionData.value,
    equals: &amp;quot;&amp;gt;&amp;quot;,  then: local!age &amp;gt; local!conditionData.value,
    equals: &amp;quot;=&amp;quot;,  then: local!age = local!conditionData.value,
    equals: &amp;quot;&amp;lt;=&amp;quot;,  then: local!age &amp;lt;= local!conditionData.value,
    equals: &amp;quot;&amp;gt;=&amp;quot;,  then: local!age &amp;gt;= local!conditionData.value,
    equals: &amp;quot;!=&amp;quot;,  then: local!age &amp;lt;&amp;gt; local!conditionData.value,

    default: null()
  ),
  

  /* Display result */
  local!result
)&lt;/pre&gt;&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/11/pastedimage1764877059900v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: To get the condition ri!age&lt;18</title><link>https://community.appian.com/thread/152689?ContentTypeID=1</link><pubDate>Thu, 04 Dec 2025 13:20:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:38fb3a74-b406-4364-85ca-05c20a75c01a</guid><dc:creator>Shubham Aware</dc:creator><description>&lt;p&gt;You have to build similar below logic.&lt;br /&gt;Make sure all operator should be present in appian as constant.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;
a!localVariables(
/* Simulate query record output from conditions table */
local!conditionData: {
  operator: &amp;quot;&amp;lt;&amp;quot;,
  value: 18
},

/* Your incoming age */
local!age: 16,
/*ri!age, */

/* Evaluate condition dynamically */
local!result: choose(
  wherecontains(
    tostring(local!conditionData.operator), 
    {&amp;quot;&amp;lt;&amp;quot;, &amp;quot;&amp;gt;&amp;quot;, &amp;quot;=&amp;quot;, &amp;quot;&amp;lt;=&amp;quot;, &amp;quot;&amp;gt;=&amp;quot;, &amp;quot;!=&amp;quot;}
  ),
  local!age &amp;lt; tointeger(local!conditionData.value),      /* &amp;lt; */
  local!age &amp;gt; tointeger(local!conditionData.value),      /* &amp;gt; */
  local!age = tointeger(local!conditionData.value),      /* = */
  local!age &amp;lt;= tointeger(local!conditionData.value),     /* &amp;lt;= */
  local!age &amp;gt;= tointeger(local!conditionData.value),     /* &amp;gt;= */
  local!age &amp;lt;&amp;gt; tointeger(local!conditionData.value)     /* != */
),

/* Display result */
local!result

)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>