<?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>Undeclared Local Variable</title><link>https://community.appian.com/discussions/f/rules/37661/undeclared-local-variable</link><description>We have an expression rule that has not been modified since 2017. The developer who wrote the rule originally is no longer with the company. This rule is executing without error in our DEV, UAT, and PRODUCTION environments. 
 However, when I go to the</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Undeclared Local Variable</title><link>https://community.appian.com/thread/141470?ContentTypeID=1</link><pubDate>Wed, 09 Oct 2024 09:37:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7d2bcccf-6f53-414c-ae5c-df0449c2979b</guid><dc:creator>andrewm231</dc:creator><description>&lt;p&gt;Thank you Mike, yes, that was the issue, it was being declared in the parent rule so when the child rule was being called, it was still within scope, though that wasn&amp;#39;t obvious at the time. It does make sense though. But the switching from &amp;quot;load&amp;quot; to &amp;quot;a!localVariables&amp;quot; is still confusing, but not within the scope of the change I&amp;#39;m attempting to make.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Undeclared Local Variable</title><link>https://community.appian.com/thread/141382?ContentTypeID=1</link><pubDate>Mon, 07 Oct 2024 15:56:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0d40aca8-c468-4d38-b635-05ffdb425676</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Sub-rules and interfaces inherit variables declared in the parent, presuming the variable is in scope.&amp;nbsp; This used to be more standard (sadly) before practices were solidified to &amp;quot;require&amp;quot; local variables be passed via rule inputs to child items.&amp;nbsp; I&amp;#39;m guessing that the parent of your example declares &amp;quot;local!TriggerQuestion&amp;quot; validly.&amp;nbsp; I&amp;#39;m unsure why switching it to a!localVariables() causes the behavior to change, other than that perhaps it&amp;#39;s more sensitive to alerting us about this sort of sloppy coding.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>