<?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>casting issue</title><link>https://community.appian.com/discussions/f/new-to-appian/37251/casting-issue</link><description>I am an trying to verify column type of each row in excel sheet against an array having type numbers 
 
 TESTCASES: 
 test1:{&amp;quot;1&amp;quot;,&amp;quot;abc&amp;quot;} passes 
 test2:{&amp;quot;abc&amp;quot;,&amp;quot;abc&amp;quot;} also passes which should actually fail .Please let me know where it went wrong 
 
 code</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: casting issue</title><link>https://community.appian.com/thread/139334?ContentTypeID=1</link><pubDate>Thu, 08 Aug 2024 21:50:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cbe8254c-0e85-4a62-977b-ba04dd571aa7</guid><dc:creator>kowsalyavijayan</dc:creator><description>&lt;p&gt;^(3[01]|[12][0-9]|0?[1-9])(\/|-)(1[0-2]|0?[1-9])\2([0-9]{2})?[0-9]{2}$&amp;nbsp; &amp;nbsp;this works&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: casting issue</title><link>https://community.appian.com/thread/139333?ContentTypeID=1</link><pubDate>Thu, 08 Aug 2024 21:25:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a4bdd4df-79bd-4fbc-9f1e-773491dd99c5</guid><dc:creator>kowsalyavijayan</dc:creator><description>&lt;p&gt;I changed my logic to regex , test cases works fine for Integer, can you help me who to write regex for date&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: casting issue</title><link>https://community.appian.com/thread/139329?ContentTypeID=1</link><pubDate>Thu, 08 Aug 2024 19:25:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0606a3a4-236d-4cb0-8ab5-cc43d3a89a86</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Sure. Do NOT cast the value.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;typeof(fv!item)=local!types[fv!index]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But keep in mind that I am not sure I fully understand what you are doing.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: casting issue</title><link>https://community.appian.com/thread/139328?ContentTypeID=1</link><pubDate>Thu, 08 Aug 2024 19:18:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d25c5043-f64e-4447-95d5-566fe1f1f43a</guid><dc:creator>kowsalyavijayan</dc:creator><description>&lt;p&gt;is there any alternate way to do this.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: casting issue</title><link>https://community.appian.com/thread/139327?ContentTypeID=1</link><pubDate>Thu, 08 Aug 2024 19:17:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ec9fa21d-f0f7-4ec9-9760-6b2608d477a2</guid><dc:creator>Stefan Helzle</dc:creator><description>[quote userid="248371" url="~/discussions/f/new-to-appian/37251/casting-issue"]typeof(cast(local!types[fv!index],fv!item))=local!types[fv!index][/quote]
&lt;p&gt;This will always match as you cast a value to the type you compare to.&lt;/p&gt;
&lt;p&gt;At least this is what I see this code snippet doing .....&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>