<?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>Hi, my users have to enter a 10 digit barcode number. I want to do some bas</title><link>https://community.appian.com/discussions/f/rules/4322/hi-my-users-have-to-enter-a-10-digit-barcode-number-i-want-to-do-some-bas</link><description>Hi, my users have to enter a 10 digit barcode number. I want to do some basic validations on the field: if(len(tointeger(ri!barcodeNumberValue_txt))&amp;lt;&amp;gt;10,&amp;quot;Error Msg.&amp;quot;,&amp;quot;&amp;quot;), if(len(tointeger(ri!barcodeNumberValue_txt))&amp;lt;&amp;gt;len(ri!barcodeNumberValue_txt),&amp;quot;Error</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Hi,&lt;br /&gt;my users have to enter a 10 digit barcode number. I want to do some bas</title><link>https://community.appian.com/thread/15485?ContentTypeID=1</link><pubDate>Mon, 23 Feb 2015 20:47:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:94d88006-eae9-4869-acc4-b8e780010098</guid><dc:creator>Conor Cahill</dc:creator><description>You&amp;#39;ll also want to be careful doing an len() after tointeger(). Leading 0&amp;#39;s will be taken off and not counted for the length (e.g. len(tointeger(&amp;quot;001&amp;quot;)) returns 1). Assuming you go with the cleanwith() approach you won&amp;#39;t be using the tointeger() so you won&amp;#39;t need to worry about this, but it&amp;#39;s something to keep in mind.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hi,&lt;br /&gt;my users have to enter a 10 digit barcode number. I want to do some bas</title><link>https://community.appian.com/thread/15473?ContentTypeID=1</link><pubDate>Mon, 23 Feb 2015 14:07:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:795b4f03-b4ae-4814-a68d-ab7d780382d0</guid><dc:creator>moritzw</dc:creator><description>Thanks for all the quick responses!&lt;br /&gt;The cleanwith approach is a great idea. I will keep the regex in mind though if there are more complex validation requirements in the future. Thanks!&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hi,&lt;br /&gt;my users have to enter a 10 digit barcode number. I want to do some bas</title><link>https://community.appian.com/thread/15472?ContentTypeID=1</link><pubDate>Mon, 23 Feb 2015 14:00:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4578f8af-7dea-4e5c-8514-08ff1c60f5ac</guid><dc:creator>best</dc:creator><description>tointeger(&amp;quot;987653214032&amp;quot;) will give you infinite, if the number has more than 10 digit.&lt;br /&gt;&lt;br /&gt;So, try this:-&lt;br /&gt;if(len(cleanwith(ri!barcodeNumberValue_txt,&amp;quot;0123456789&amp;quot;))&amp;lt;&amp;gt;10,&amp;quot;Error Msg.&amp;quot;,&amp;quot;&amp;quot;)&lt;br /&gt;if(len(cleanwith(ri!barcodeNumberValue_txt,&amp;quot;0123456789&amp;quot;))&amp;lt;&amp;gt;len(ri!barcodeNumberValue_txt),&amp;quot;Error Msg.&amp;quot;,&amp;quot;&amp;quot;)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hi,&lt;br /&gt;my users have to enter a 10 digit barcode number. I want to do some bas</title><link>https://community.appian.com/thread/15471?ContentTypeID=1</link><pubDate>Mon, 23 Feb 2015 13:47:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:866402b7-1e85-4426-8dd5-b47d42375144</guid><dc:creator>PhilB</dc:creator><description>You may find this tool helpful: &lt;a href="http://www.regexr.com/"&gt;http://www.regexr.com/&lt;/a&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hi,&lt;br /&gt;my users have to enter a 10 digit barcode number. I want to do some bas</title><link>https://community.appian.com/thread/15470?ContentTypeID=1</link><pubDate>Mon, 23 Feb 2015 13:46:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:701bde43-3654-43d4-9977-951a52021896</guid><dc:creator>Tim</dc:creator><description>The regex expressions are very useful in multiple scenarios. Using the plugin Phil suggest you could use the following:&lt;br /&gt;regexmatch(&amp;quot;[A-Z]&amp;quot;, ri!barcodeNumberValue_txt)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hi,&lt;br /&gt;my users have to enter a 10 digit barcode number. I want to do some bas</title><link>https://community.appian.com/thread/15469?ContentTypeID=1</link><pubDate>Mon, 23 Feb 2015 13:40:23 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:01c2936b-7730-4c71-96c6-1a484c34bd79</guid><dc:creator>PhilB</dc:creator><description>Have you considered using regular expressions? There&amp;#39;s a plugin that allows this: &lt;a href="https://forum.appian.com/suite/tempo/records/type/components/item/i8BWsQdLlzKy55h8z8zJ0sPqpDWFrba_r1YlygCm-TKqTLKvZxD4yWVC4FOz2pH_w/view/summary"&gt;forum.appian.com/.../summary&lt;/a&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>