<?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>Add zero to the left of Integer</title><link>https://community.appian.com/discussions/f/general/38189/add-zero-to-the-left-of-integer</link><description>I want to add a certain number of zero to the left of an integer number and save it to an Integer rule input..I was using text(value,&amp;quot;0000&amp;quot;) this function which gave me exact format but when I save that to an Integer variable , all zeros had been removed</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Add zero to the left of Integer</title><link>https://community.appian.com/thread/143802?ContentTypeID=1</link><pubDate>Thu, 19 Dec 2024 11:48:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c87ded62-535a-4d4c-b92d-d0e8313a38aa</guid><dc:creator>prashamas6791</dc:creator><description>&lt;p&gt;Thank you &lt;a href="/members/mikes0011"&gt;Mike Schmitt&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add zero to the left of Integer</title><link>https://community.appian.com/thread/143781?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2024 20:48:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a5024064-657d-40c8-aff8-dfb3ed50ab3a</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;To clarify, integer (the data type) does not understand or care about &amp;quot;leading zeroes&amp;quot;.&amp;nbsp; &amp;quot;0001&amp;quot; is not a distinct integer from &amp;quot;1&amp;quot;, both have a value of &amp;quot;1&amp;quot; (stored deeper in the system as the binary representation fo the number &amp;quot;1&amp;quot; moreover).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What you&amp;#39;re asking for here is display formatting, for which (as others have mentioned) you&amp;#39;d use text and various rules/functions to format its displayed value, and/or you could store a literal representation of the displayed format you&amp;#39;re after into a text field.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But what you need to understand most is that these are completely different things - otherwise you&amp;#39;re gonna have a hard time with coding anything in Appian.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add zero to the left of Integer</title><link>https://community.appian.com/thread/143766?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2024 11:28:48 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5b608c17-678e-4904-98cc-4002e595c3c7</guid><dc:creator>prashamas6791</dc:creator><description>&lt;p&gt;Appreciate the suggestion , thank you &amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add zero to the left of Integer</title><link>https://community.appian.com/thread/143765?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2024 11:20:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6e868560-28f6-443a-8f7c-193c3bb9338c</guid><dc:creator>prashamas6791</dc:creator><description>&lt;p&gt;Got it, thank you &lt;a href="/members/mathieud0001"&gt;Mathieu Drouin&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add zero to the left of Integer</title><link>https://community.appian.com/thread/143764?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2024 11:10:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:24fcb91a-c668-4de4-b29a-47320c043543</guid><dc:creator>venkatrea696188</dc:creator><description>[quote userid="268600" url="~/discussions/f/general/38189/add-zero-to-the-left-of-integer/143760"].is that possible to save the said format into an integer field.[/quote]
&lt;p&gt;It&amp;#39;s not possible , Just like others suggested the only two possibilities are&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1. Changing the data type of the field to string&lt;/p&gt;
&lt;p&gt;2. On interface level show it in a text field by adding the zeros .&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add zero to the left of Integer</title><link>https://community.appian.com/thread/143763?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2024 10:56:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6fe9a252-8515-4dc1-b7e1-6daa6616c611</guid><dc:creator>Mathieu Drouin</dc:creator><description>&lt;p&gt;If you want to display leading zeros, I would suggest using a textfield. You can use a regex function to validate that all characters are numbers. Otherwise, tointeger on the onSave will just strip the non-integer values.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add zero to the left of Integer</title><link>https://community.appian.com/thread/143761?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2024 09:36:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8af1735d-2a3a-4cfe-ab7c-93cbb1ad586d</guid><dc:creator>gayatria0439</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;a href="/members/prashamas6791"&gt;prashamas6791&lt;/a&gt;&amp;nbsp;,&lt;br /&gt;I think it is not possible because if it is an integer field, then it won&amp;#39;t accept this format because it&amp;nbsp;will remove all the zeros before the ID.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add zero to the left of Integer</title><link>https://community.appian.com/thread/143760?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2024 08:49:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2fbbf37c-ba3f-490b-81f0-1203aaa4519d</guid><dc:creator>prashamas6791</dc:creator><description>&lt;p&gt;Thanks for your suggestion&lt;a href="/members/gayatria0439"&gt;gayatria0439&lt;/a&gt;&amp;nbsp;&lt;br /&gt;My requirement is save &amp;quot;00234&amp;quot; this kind of format into an integer field&amp;nbsp;, there is an related record field(integer)where I should saving the value ... in case of concat the leading zeros are previously visible to the field and in that case also all zeros are removed while saving....so can you please suggest ...is that possible to save the said format into an integer field.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add zero to the left of Integer</title><link>https://community.appian.com/thread/143759?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2024 08:36:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:82653e35-e5e1-44e2-b1cf-bd92739a872a</guid><dc:creator>gayatria0439</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;a href="/members/prashamas6791"&gt;prashamas6791&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;What is your actual requirement? If you&amp;#39;re trying to concat four zeros (0000) before the ID, why are you using&amp;nbsp;text() under the value? Additionally, it will not accept a number like 01223; it will only accept 1223, and the leading zero will be removed. When we try to pass the zero as a value to the rule input, it will accept it. Therefore, try using text or any other type by handling it in the submit/save button or through a local variable. However, it will only accept one zero as a prefix, even if you concatenate four zeros (0000).&lt;br /&gt;&lt;br /&gt;Please let me know if you need any additional help here or if you get the solution.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>