<?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>Cannot update Map using null index</title><link>https://community.appian.com/discussions/f/user-interface/30157/cannot-update-map-using-null-index</link><description>HII i am getting this error - Expression evaluation error [evaluation ID = NYEY6] in rule &amp;#39;gai_displaybatchrecordsummary&amp;#39; at function a!gridField [line 59]: Cannot update Map using null index (APNX-1-4522-005) 
 
 How can i resolve this 
 i have added</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Cannot update Map using null index</title><link>https://community.appian.com/thread/119923?ContentTypeID=1</link><pubDate>Thu, 28 Sep 2023 08:43:03 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3c8d0121-6865-40c9-aeb5-0247c7bf1a87</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;&lt;span&gt;Please stop posting ChatGPT generated posts !!!&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot update Map using null index</title><link>https://community.appian.com/thread/119914?ContentTypeID=1</link><pubDate>Thu, 28 Sep 2023 07:12:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c6fa117f-7778-4811-9ba1-787b5bc072e6</guid><dc:creator>Hemanth Kumar Penisetti</dc:creator><description>&lt;p&gt;The error message you&amp;#39;re encountering, &amp;quot;Cannot update Map using null index (APNX-1-4522-005),&amp;quot; indicates that there is an issue with the indexing of a map in your Appian expression. Specifically, it seems to be related to the use of an index on a map (dictionary) where the index is either null or undefined.&lt;/p&gt;
&lt;p&gt;Based on the code snippet you provided, I can see that you&amp;#39;re trying to access fields within a record, and this error might be happening when attempting to access the following field:&lt;/p&gt;
&lt;p&gt;```plaintext&lt;br /&gt;ri!record['recordType!{43099841-b468-444e-97af-bc369b79a6fc}GAI Batch.fields.{c835857e-c9ec-40d4-a818-f2d8593b1100}batchNumber']&lt;br /&gt;```&lt;/p&gt;
&lt;p&gt;To resolve this issue, you should ensure that the `ri!record` variable is not null or empty before attempting to access its fields. You can do this using the `a!isNotNullOrEmpty()` function, which you&amp;#39;ve already used in your code.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s how you can modify your code to handle this situation:&lt;/p&gt;
&lt;p&gt;```a!gridField(&lt;br /&gt; showWhen: a!isNotNullOrEmpty(&lt;br /&gt; ri!record['recordType!{43099841-b468-444e-97af-bc369b79a6fc}GAI Batch.fields.{c835857e-c9ec-40d4-a818-f2d8593b1100}batchNumber']&lt;br /&gt; ),&lt;br /&gt; // ... rest of your code&lt;br /&gt;)&lt;br /&gt;```&lt;/p&gt;
&lt;p&gt;By adding the `showWhen` condition, you ensure that the `a!gridField` is only displayed when the specified field in `ri!record` is not null or empty, which should prevent the &amp;quot;null index&amp;quot; error.&lt;/p&gt;
&lt;p&gt;Please make sure that you have also initialized the `ri!record` variable correctly before using it in this expression. If it&amp;#39;s supposed to hold data, ensure it contains the necessary data before using it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>