<?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>Need validation while uploading Excel</title><link>https://community.appian.com/discussions/f/general/40135/need-validation-while-uploading-excel</link><description>No warning or error message is displayed when the user uploads a file containing duplicate advisor code and Line of business. 
 I need validation message when I am uploading more than 1 entry with same data. 
 a!forEach( items: local!constructData, expression</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Need validation while uploading Excel</title><link>https://community.appian.com/thread/153272?ContentTypeID=1</link><pubDate>Tue, 27 Jan 2026 07:45:43 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:520ce06c-dc8b-484f-b9bb-a9d5951623d5</guid><dc:creator>Shubham Aware</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!constructData: {
    a!map(advisorCode: &amp;quot;A01000&amp;quot;, lineOfBusiness: &amp;quot;Life&amp;quot;),
    a!map(advisorCode: &amp;quot;A01000&amp;quot;, lineOfBusiness: &amp;quot;Life&amp;quot;),
    a!map(advisorCode: &amp;quot;A02000&amp;quot;, lineOfBusiness: &amp;quot;Health&amp;quot;)
  },

  /* Create combined keys */
  local!allKeys: a!forEach(
    items: local!constructData,
    expression: fv!item.advisorCode &amp;amp; &amp;quot;|&amp;quot; &amp;amp; fv!item.lineOfBusiness
  ),

  /* Find duplicates */
  local!duplicates: a!forEach(
    items: local!constructData,
    expression: if(
      count(
        wherecontains(
          fv!item.advisorCode &amp;amp; &amp;quot;|&amp;quot; &amp;amp; fv!item.lineOfBusiness,
          local!allKeys
        )
      ) &amp;gt; 1,
      &amp;quot;Duplicate: &amp;quot; &amp;amp; fv!item.advisorCode &amp;amp; &amp;quot; - &amp;quot; &amp;amp; fv!item.lineOfBusiness,
      null
    )
  ),

  reject(fn!isnull, local!duplicates)
)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Check this sample code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need validation while uploading Excel</title><link>https://community.appian.com/thread/153267?ContentTypeID=1</link><pubDate>Tue, 27 Jan 2026 07:10:27 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ad484d28-5f01-4388-9b27-ebf1cb6a377f</guid><dc:creator>Shubham Aware</dc:creator><description>&lt;p&gt;Can you share your full code?&lt;br /&gt;I hope you are using file upload validation parameter to validate.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need validation while uploading Excel</title><link>https://community.appian.com/thread/153266?ContentTypeID=1</link><pubDate>Tue, 27 Jan 2026 07:07:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9c275f74-9853-4eb5-80e9-79e9816dcab4</guid><dc:creator>harshithal2027</dc:creator><description>&lt;p&gt;it is inside a!foreach we will not get data&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need validation while uploading Excel</title><link>https://community.appian.com/thread/153265?ContentTypeID=1</link><pubDate>Tue, 27 Jan 2026 07:05:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:15417bbc-709c-4d53-b6fa-6c73820ebd43</guid><dc:creator>Shubham Aware</dc:creator><description>&lt;p&gt;I mean share&amp;nbsp;local!constructData output to help you better.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need validation while uploading Excel</title><link>https://community.appian.com/thread/153264?ContentTypeID=1</link><pubDate>Tue, 27 Jan 2026 07:02:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:43854c19-0ca1-4cf8-92d1-8ba5495aac60</guid><dc:creator>harshithal2027</dc:creator><description>&lt;p&gt;it is in a!foreach&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need validation while uploading Excel</title><link>https://community.appian.com/thread/153263?ContentTypeID=1</link><pubDate>Tue, 27 Jan 2026 07:01:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:072cb369-f1be-4972-9c49-c1fdf88b1aed</guid><dc:creator>Shubham Aware</dc:creator><description>&lt;p&gt;Excel parse rule/plugin not populating local!constructData correctly. Share parse code for exact fix&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need validation while uploading Excel</title><link>https://community.appian.com/thread/153261?ContentTypeID=1</link><pubDate>Tue, 27 Jan 2026 06:58:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cbb042bd-26f3-4565-98a1-757de1e07484</guid><dc:creator>harshithal2027</dc:creator><description>&lt;p&gt;tried provided code. But both entries are getting uploaded. It is not triggering the validation&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need validation while uploading Excel</title><link>https://community.appian.com/thread/153260?ContentTypeID=1</link><pubDate>Tue, 27 Jan 2026 06:49:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5eb36f72-2404-4735-9e88-431a653c4146</guid><dc:creator>Shubham Aware</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!forEach(
  items: local!constructData,
  expression: if(
    length(
      where(
        and(
          local!constructData.advisorCode = fv!item.advisorCode,
          local!constructData.lineOfBusiness = fv!item.lineOfBusiness
        )
      )
    ) &amp;gt; 1,
    &amp;quot;Duplicate: &amp;quot; &amp;amp; fv!item.advisorCode &amp;amp; &amp;quot; - &amp;quot; &amp;amp; fv!item.lineOfBusiness,
    null
  )
)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Filter nulls and show in validation:&lt;br /&gt;&lt;br /&gt;reject(fn!isnull, {above code})&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>