<?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 to write to database with dynamic cdt type</title><link>https://community.appian.com/discussions/f/data/21143/need-to-write-to-database-with-dynamic-cdt-type</link><description>Team, 
 
 Scenario, We have a UI where Admin team selected the table from dropdown where they want to make changes . Now i have to send that CDT as an input to write to datastore from interface. 
 
 Can this is something we can do , entity remains same</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: need to write to database with dynamic cdt type</title><link>https://community.appian.com/thread/82413?ContentTypeID=1</link><pubDate>Mon, 07 Jun 2021 21:07:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:37631d99-b0d3-4d96-a5f2-092bbf62e607</guid><dc:creator>baratc</dc:creator><description>&lt;p&gt;Hi Gaurav,&lt;/p&gt;
&lt;p&gt;Following are the 2 options i would try&amp;nbsp;&lt;/p&gt;
&lt;p&gt;a) a!writeToDataStoreEntity()&amp;nbsp; might help you. based on the user selection you can dynamically update the parameters,but only thing is you wont be able to validate the values using monitoring&amp;nbsp;&lt;/p&gt;
&lt;p&gt;b)Other option is to create lookup table which contains values for all the tables. Based on the user&amp;#39;s table selection (assign the foreign-key id which refers-to the lookup-table), you can create entry in the reference table with some entries. Only challenge is anytime when you create new table ,you need to create entry in the lookup table.&lt;/p&gt;
&lt;p&gt;example&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Lookup table&lt;/p&gt;
&lt;p&gt;id , tablename&lt;/p&gt;
&lt;p&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;employeeinfo&lt;/p&gt;
&lt;p&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; leaverequest&lt;/p&gt;
&lt;p&gt;3.&amp;nbsp; &amp;nbsp; &amp;nbsp;masterdata&lt;/p&gt;
&lt;p&gt;Reference-table (based on the user selection , populate the values here)&lt;/p&gt;
&lt;p&gt;refid lookupid(foreign-key), cdtvalue&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;status&lt;/p&gt;
&lt;p&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; employeeinfo&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;completed&lt;/p&gt;
&lt;p&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span&gt;employeeinfo&amp;nbsp; &amp;nbsp; &amp;nbsp;inprogress&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; masterdata&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;new&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Hope this helps.&lt;/p&gt;
&lt;p&gt;Thanks,Barat&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: need to write to database with dynamic cdt type</title><link>https://community.appian.com/thread/82411?ContentTypeID=1</link><pubDate>Mon, 07 Jun 2021 17:45:03 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:beaa0919-5761-4bd6-8a0d-cf7ceaf0e789</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;You&amp;#39;d probably have more luck with the &amp;quot;write to multiple DSE&amp;quot; node, where you can expressionize both the entity as well as the data you want to pass in.&amp;nbsp; Just note you still might need to do a lot of manual logic to pass in different data types - i&amp;#39;d start out trying to do a very small proof of concept and see if it scales too big when you try to add other types.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>