<?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>CastInvalid (APNX-1-4198-000)</title><link>https://community.appian.com/discussions/f/rules/17442/castinvalid-apnx-1-4198-000</link><description>I am receiving the following error on the summary page of a record. 
 &amp;quot; Error Evaluating UI Expression Expression evaluation error [evaluation ID = WNTC55XX] in rule &amp;#39;rsr_iai_casesummaryview&amp;#39; at function a!textField [line 10]: Could not cast from Number</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: CastInvalid (APNX-1-4198-000)</title><link>https://community.appian.com/thread/68787?ContentTypeID=1</link><pubDate>Tue, 13 Aug 2019 17:34:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:76430064-1512-4e03-9b9f-8aecd5fdb4c6</guid><dc:creator>sirishreddyr0001</dc:creator><description>&lt;p&gt;Will do. Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CastInvalid (APNX-1-4198-000)</title><link>https://community.appian.com/thread/68786?ContentTypeID=1</link><pubDate>Tue, 13 Aug 2019 14:36:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6f0032be-d40b-46ee-a012-061f4fce706a</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;For what it&amp;#39;s worth, I strongly urge you to write that code like this instead:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;rule!RSR_IAI_CaseSummaryView(
  ruleInput1: rule!RSR_IAI_QueryTable(
    id: rf!intakeID
  ),
  ruleInput2: true,
  ruleInput3: true
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;(you will need to replace &amp;quot;ruleInput1&amp;quot;, etc, with the actual rule input names from your CaseSummaryView rule).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CastInvalid (APNX-1-4198-000)</title><link>https://community.appian.com/thread/68785?ContentTypeID=1</link><pubDate>Tue, 13 Aug 2019 14:25:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1fc9b4fa-8d1d-4538-88f0-826a36fca789</guid><dc:creator>sirishreddyr0001</dc:creator><description>&lt;p&gt;@peter. This worked. Thank you. I did try this earlier but my interface was called before the query rule&amp;nbsp;during that attempt. Such a simple solution to the issue. Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CastInvalid (APNX-1-4198-000)</title><link>https://community.appian.com/thread/68784?ContentTypeID=1</link><pubDate>Tue, 13 Aug 2019 14:21:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:947dec86-ad9f-4f0d-b6be-fe06e1b6f726</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;For query-style Expression rules, you should&amp;nbsp;&lt;strong&gt;always&lt;/strong&gt; pass in your rule inputs using dictionary syntax.&amp;nbsp; If you don&amp;#39;t, and you ever edit the rule to add a new parameter (such as a new filter on your query), any places you&amp;#39;ve already called it without dictionary syntax will break.&amp;nbsp; Therefore I urge you to format your rule call like this:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;rule!RSR_IAI_QueryTable(&lt;strong&gt;id:&lt;/strong&gt; rf!intakeID)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You should also format calls to your CaseSummaryView rule this way.&amp;nbsp; That said, what does that rule do and where/how are you trying to use it?&amp;nbsp; Is it displaying the above error(s) in the Interface Designer, or somewhere else?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CastInvalid (APNX-1-4198-000)</title><link>https://community.appian.com/thread/68783?ContentTypeID=1</link><pubDate>Tue, 13 Aug 2019 14:16:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:67d76cf5-c976-4c17-bb71-371a25414a06</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;Based on the errors, I&amp;#39;m guessing that you want this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;rule!RSR_IAI_CaseSummaryView(
    rule!RSR_IAI_QueryTable(
        rf!intakeID
    ),
    true,
    true
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CastInvalid (APNX-1-4198-000)</title><link>https://community.appian.com/thread/68782?ContentTypeID=1</link><pubDate>Tue, 13 Aug 2019 14:15:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ae3036a2-9833-42f0-a968-4d0f6cf729d6</guid><dc:creator>sirishreddyr0001</dc:creator><description>&lt;p&gt;The query rule displays all the field values of the record based on the cased/record id(primary key). It works when i test it in the query interface. I have attached a screen shot of the query.&lt;/p&gt;
&lt;p&gt;On the first error, i have tried passing single parameter as opposed to 3 but it&amp;#39;s the same error.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/15/2019_2D00_08_2D00_13_5F00_10_2D00_10_2D00_30.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CastInvalid (APNX-1-4198-000)</title><link>https://community.appian.com/thread/68781?ContentTypeID=1</link><pubDate>Tue, 13 Aug 2019 14:01:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:590c478d-1f63-4c46-afba-0136892e1d83</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Without knowing what those two rules do and what their parameters are, we really have no way of knowing what the issue might be.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Though I can tell you that the first error message above (complaining about number of parameters) is due to you passing a single value (the result of the QueryTable rule) into the CaseSummaryView rule which has more than one parameter.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CastInvalid (APNX-1-4198-000)</title><link>https://community.appian.com/thread/68780?ContentTypeID=1</link><pubDate>Tue, 13 Aug 2019 13:50:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b1c48290-6e9c-489a-a816-16fb32352e3f</guid><dc:creator>sirishreddyr0001</dc:creator><description>&lt;p&gt;Hi Peter, Thank you for the prompt response. I am new to Appian, so please bear with me.&lt;/p&gt;
&lt;p&gt;I tried changing the query to the following three&amp;nbsp;versions&amp;nbsp;but none of them worked:&lt;/p&gt;
&lt;p&gt;rule!RSR_IAI_CaseSummaryView(rule!RSR_IAI_QueryTable(rf!intakeID,false,true))&lt;br /&gt;Error Evaluating UI Expression &lt;br /&gt;&lt;span&gt;Expression evaluation error [evaluation ID = 50WZ70B2] at function rule!RSR_IAI_CaseSummaryView: Rule &amp;#39;rsr_iai_casesummaryview&amp;#39; has 3 parameters, but instead passed 1 parameters. (APNX-1-4198-000)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;rule!RSR_IAI_CaseSummaryView(rf!intakeID,false,true)&lt;br /&gt;Error Evaluating UI Expression&lt;br /&gt;Expression evaluation error [evaluation ID = SOGIN7P8] in rule &amp;#39;rsr_iai_casesummaryview&amp;#39; at function a!textField [line 10]: Could not cast from Number (Integer) to RSR_IAI_IntakeAssessment. Details: CastInvalid (APNX-1-4198-000)&lt;/p&gt;
&lt;p&gt;rule!RSR_IAI_QueryTable(rf!intakeID)&lt;br /&gt;Expression evaluation error [evaluation ID = QCS431O1] : Cannot compare incompatible operands of type List of Variant and type Number (Integer). (APNX-1-4198-000)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CastInvalid (APNX-1-4198-000)</title><link>https://community.appian.com/thread/68763?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2019 16:46:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9854291c-d7d5-4ed5-86c2-6717b53f1573</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;Just a guess based on naming, but it seems like your rules should be reversed:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;rule!RSR_IAI_CaseSummaryView(
    rule!RSR_IAI_QueryTable(
        rf!intakeID,
        true,
        true
    )   
) &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The summary view should be the outermost rule since that is the interface that displays; your query is what returns the data to be passed into the interface rule. If that doesn&amp;#39;t work, I&amp;#39;d suggest trying them individually to see if they work (i.e. just summary view with no inputs, just query with no inputs). Also, try it in a different interface / expression rule and hardcode your rf! variables to see if they work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>