<?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>Auto Generate primary ID using a custom prefix</title><link>https://community.appian.com/discussions/f/data/24753/auto-generate-primary-id-using-a-custom-prefix</link><description>Hello, 
 I would like to create a CDT with a primary key which must be an Auto-generated value but with a prefixed value. 
 Ex: &amp;quot;APP_01&amp;quot;, 
 Where the number 01 must be an auto incremented value. Is it possible to do so? If yes please suggest me a possible</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Auto Generate primary ID using a custom prefix</title><link>https://community.appian.com/thread/95955?ContentTypeID=1</link><pubDate>Fri, 03 Jun 2022 18:29:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7da27057-672f-4074-bcea-eb5e8d0f2298</guid><dc:creator>ChristineLHutchison</dc:creator><description>&lt;p&gt;Keep in mind that you can expose other columns to end users and use the PK only &amp;quot;behind the scenes&amp;quot;, There are pros and cons in DBs to not using integers as PKs. Relational DBs will implicitly build indexes on PKs to make lookups quicker and then&amp;nbsp;whole numbers will generally be quicker and less resource consuming when querying by the PK.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Auto Generate primary ID using a custom prefix</title><link>https://community.appian.com/thread/95923?ContentTypeID=1</link><pubDate>Fri, 03 Jun 2022 08:42:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9556fd6c-f6c9-4b2c-acce-d2f57f86836a</guid><dc:creator>Konduru Chaitanya</dc:creator><description>&lt;p&gt;Hi Manish,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you for the link!&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Auto Generate primary ID using a custom prefix</title><link>https://community.appian.com/thread/95789?ContentTypeID=1</link><pubDate>Wed, 01 Jun 2022 08:50:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:798f1158-6d58-4b34-836b-ac9b428758e2</guid><dc:creator>Manish_Kumar</dc:creator><description>&lt;p&gt;Hi Chaitanya,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The below link will help you.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.sqlteam.com/articles/custom-auto-generated-sequences-with-sql-server"&gt;www.sqlteam.com/.../custom-auto-generated-sequences-with-sql-server&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Auto Generate primary ID using a custom prefix</title><link>https://community.appian.com/thread/95764?ContentTypeID=1</link><pubDate>Wed, 01 Jun 2022 03:55:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7d2c95cf-5125-49af-96c3-fd1b36bd7087</guid><dc:creator>Konduru Chaitanya</dc:creator><description>&lt;p&gt;Hi Peter,&lt;/p&gt;
&lt;p&gt;Since I am new to Appian I&amp;#39;ve been exploring multiple ways to make a combination of Alpha-numeric values to display the User-Id. I wanted it to be stored as a combination of alphabets and numbers in the database. I have already tried the way which you have mentioned. I tried using the Alphabets and &amp;amp; concatenation using the PK value in the interface. Just wanted to know if there is any possible way to generate it automatically in the DB with no multiple columns.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Auto Generate primary ID using a custom prefix</title><link>https://community.appian.com/thread/95753?ContentTypeID=1</link><pubDate>Tue, 31 May 2022 16:24:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:84343439-a1b8-4d31-9501-f432f28388f6</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;Stewart gave a good solution, but I&amp;#39;d also be curious how you plan to use this. Like do you actually need the value in the database or are you just hoping to have a friendly way of displaying the PK in Appian? If it&amp;#39;s the latter, I&amp;#39;d recommend just storing the integer in the database and then have some method of formatting the result in Appian. For example, you could create a custom field that concatenates an app name in front of the identifer and it should work perfectly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Auto Generate primary ID using a custom prefix</title><link>https://community.appian.com/thread/95722?ContentTypeID=1</link><pubDate>Tue, 31 May 2022 08:01:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:813acca6-fc1a-45c3-9b00-5e76921f1a0d</guid><dc:creator>Konduru Chaitanya</dc:creator><description>&lt;p&gt;Thank you. Will try.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Auto Generate primary ID using a custom prefix</title><link>https://community.appian.com/thread/95721?ContentTypeID=1</link><pubDate>Tue, 31 May 2022 07:49:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c2b03406-d97c-4778-950a-831c01a1fcf7</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;You could roll your own solution to this. You could create a database table that has a column to hold the prefix e.g. &amp;#39;APP&amp;#39; in your example, and then another column that holds the latest sequence number e.g. &amp;#39;01&amp;#39; in your example, and then write a Stored Procedure that takes those two values, increments the number part of it and writes that back to the same table, and then returns the concatenation of those two values. You can then call that Stored Procedure from Appian and use the returned value as your custom key for use where you intend to use it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>