<?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>Invalid index: Cannot index property &amp;#39;result&amp;#39; of type Text into type HttpResponse</title><link>https://community.appian.com/discussions/f/general/25504/invalid-index-cannot-index-property-result-of-type-text-into-type-httpresponse</link><description>I am using trying to pass httpResponse.result in one of the expression rule .. in script task 
 
 
 rule!OIT_getTransactionDetails( 
 httpResponse:ri!httpResponse.result, 
 activeStatus:ri!status 
 ) 
 But it returns Error like Invalid index: Cannot index</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Invalid index: Cannot index property 'result' of type Text into type HttpResponse</title><link>https://community.appian.com/thread/99685?ContentTypeID=1</link><pubDate>Thu, 18 Aug 2022 08:56:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:07a02ae8-7d0c-4ed0-8a7c-4d3c3959d21e</guid><dc:creator>Klaus34</dc:creator><description>&lt;p&gt;Actually i got the&amp;nbsp;Solution&amp;nbsp;&amp;nbsp;,Problem was with Data .. Thanks Guys for support&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid index: Cannot index property 'result' of type Text into type HttpResponse</title><link>https://community.appian.com/thread/99475?ContentTypeID=1</link><pubDate>Fri, 12 Aug 2022 14:13:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9eea700b-c1a1-4e53-8b02-a1c61d03978a</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;If this is the code going into your script task, you would not write &amp;quot;ri!httpResponse&amp;quot; in the first place.&amp;nbsp; If your httpResponse has been stored in a PV by a previous node, then you&amp;#39;d write &amp;quot;pv!httpResponse&amp;quot; here.&amp;nbsp; If your httpResponse is coming in via some other method you haven&amp;#39;t specified, then we need more information before being able to suggest much.&amp;nbsp; But the &amp;quot;ri!&amp;quot; prefix is only for use &lt;em&gt;&lt;strong&gt;inside a rule or expression&lt;/strong&gt;&lt;/em&gt;, and will not be valid if called directly from a process model expression editor box in &lt;em&gt;&lt;strong&gt;any&lt;/strong&gt;&lt;/em&gt; context.&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/11/pastedimage1660313644267v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid index: Cannot index property 'result' of type Text into type HttpResponse</title><link>https://community.appian.com/thread/99465?ContentTypeID=1</link><pubDate>Fri, 12 Aug 2022 10:42:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:729591f8-93d8-4128-8303-00ece592db41</guid><dc:creator>deepakg271869</dc:creator><description>&lt;p&gt;from where you are getting httpsRespone? it will help us to put more lights in your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid index: Cannot index property 'result' of type Text into type HttpResponse</title><link>https://community.appian.com/thread/99462?ContentTypeID=1</link><pubDate>Fri, 12 Aug 2022 10:02:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c667a83d-171b-4eef-8da1-a5decf3a6e0c</guid><dc:creator>Klaus34</dc:creator><description>&lt;p&gt;Error means which is mentioned in the Subject..&lt;/p&gt;
&lt;p&gt;I tried initially the same as u are suggesting in the chain.. but not a problem I will try to inspect&amp;nbsp;more&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid index: Cannot index property 'result' of type Text into type HttpResponse</title><link>https://community.appian.com/thread/99461?ContentTypeID=1</link><pubDate>Fri, 12 Aug 2022 09:08:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b475f36d-346d-407c-a2cf-6419169e2c84</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;What is giving which error?&lt;/p&gt;
&lt;p&gt;Did you try to change your code from&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;rule!OIT_getTransactionDetails(
  issueTransitions:pv!issueTransitions.result,
  appianIssueStatus:ri!status
)

to

rule!OIT_getTransactionDetails(
  issueTransitions:pv!issueTransitions,
  appianIssueStatus:ri!status
)
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;When you execute this code in a script task, where is ri!status coming from?&lt;/p&gt;
&lt;p&gt;I suggest to go back to the beginning, do one step at a time and test&amp;amp;validate each step.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid index: Cannot index property 'result' of type Text into type HttpResponse</title><link>https://community.appian.com/thread/99460?ContentTypeID=1</link><pubDate>Fri, 12 Aug 2022 09:03:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:13c9df2d-8740-4470-8d71-804265e08547</guid><dc:creator>Klaus34</dc:creator><description>&lt;p&gt;it is giving the same error actually in the output of Script task. removed index function used dot operator&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid index: Cannot index property 'result' of type Text into type HttpResponse</title><link>https://community.appian.com/thread/99459?ContentTypeID=1</link><pubDate>Fri, 12 Aug 2022 08:56:23 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:582b2d00-8fce-45a7-b08b-b08e5ed7cc12</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Hm ... I just checked, the HttpResponse data type does not have a field &amp;quot;result&amp;quot;.&lt;/p&gt;
&lt;p&gt;BTW, using the index() function with multiple indexes is not officially supported and has weird edge cases. I recommend to not do this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid index: Cannot index property 'result' of type Text into type HttpResponse</title><link>https://community.appian.com/thread/99458?ContentTypeID=1</link><pubDate>Fri, 12 Aug 2022 08:46:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7fd3a323-e9eb-466d-89c0-f46e80071d0a</guid><dc:creator>Klaus34</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!IssueStatus: index(
    ri!issueTransitions,
    &amp;quot;body&amp;quot;,
    &amp;quot;transitions&amp;quot;,
    &amp;quot;name&amp;quot;,
    {}
  ),
  local!IssueIDs: index(
    ri!issueTransitions,
    &amp;quot;body&amp;quot;,
    &amp;quot;transitions&amp;quot;,
    &amp;quot;id&amp;quot;,
    {}
  ),
  displayvalue(
    ri!appianIssueStatus,
    local!IssueStatus,
    local!IssueIDs,
    {}
  )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Where ri!IssueTransitions is of type Anytype in expression rule .. But in process model&amp;nbsp; i am fetching the data from integration.. so made this as type HTTPresponse...&amp;nbsp;&lt;br /&gt;&lt;br /&gt;so i am calling the above code as expression in one of script task&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#3366ff;"&gt;rule!OIT_getTransactionDetails(&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#3366ff;"&gt;issueTransitions:pv!issueTransitions.result,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#3366ff;"&gt;&amp;nbsp;appianIssueStatus:ri!status&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#3366ff;"&gt;)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#3366ff;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;appianIssueStatus is just of text type&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;&amp;nbsp;.. but it doesn&amp;#39;t give me desired outpu&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid index: Cannot index property 'result' of type Text into type HttpResponse</title><link>https://community.appian.com/thread/99457?ContentTypeID=1</link><pubDate>Fri, 12 Aug 2022 08:39:27 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:561ad282-0a0c-43c6-8e85-ea6e3b33c75d</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;OK. Then, I need more details. Code snippets, screen shots, anything that helps me to understand what is going on.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid index: Cannot index property 'result' of type Text into type HttpResponse</title><link>https://community.appian.com/thread/99456?ContentTypeID=1</link><pubDate>Fri, 12 Aug 2022 08:38:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:efed00e9-be53-472f-9450-1b418409550d</guid><dc:creator>Klaus34</dc:creator><description>&lt;p&gt;Rule input i selected is of anytype .. still it didnt got resolved ..same error&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid index: Cannot index property 'result' of type Text into type HttpResponse</title><link>https://community.appian.com/thread/99454?ContentTypeID=1</link><pubDate>Fri, 12 Aug 2022 08:35:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:01d9b605-3b11-45b2-adfa-2a17a32d8c17</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Could it be that you defined the rule input to be of type Text? Did you try to select the type Any?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>