<?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>Updating DB in a new row instead of existing row</title><link>https://community.appian.com/discussions/f/user-interface/26708/updating-db-in-a-new-row-instead-of-existing-row</link><description>I have form where I need to update the DB for an already existing row with the Date details. But when I clcik on submit it is creating a new row. Please help. 
 .</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Updating DB in a new row instead of existing row</title><link>https://community.appian.com/thread/104816?ContentTypeID=1</link><pubDate>Mon, 28 Nov 2022 12:54:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4f577ab7-6887-489e-9e4f-746799e6579c</guid><dc:creator>deepakg271869</dc:creator><description>&lt;p&gt;you have to pass the primary key of each row to update the data in the table.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Updating DB in a new row instead of existing row</title><link>https://community.appian.com/thread/104815?ContentTypeID=1</link><pubDate>Mon, 28 Nov 2022 12:24:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b1f4bfb9-2981-4307-94e2-1d3554c694e2</guid><dc:creator>p2005</dc:creator><description>&lt;p&gt;Thanks Harsha, It worked.&lt;/p&gt;
&lt;p&gt;Now Im able to update the first row in DB. Could you please tell how to update the remaining rows in DB with the same input.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Updating DB in a new row instead of existing row</title><link>https://community.appian.com/thread/104810?ContentTypeID=1</link><pubDate>Mon, 28 Nov 2022 11:29:26 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9964359f-d25d-4151-8649-85f9332180fc</guid><dc:creator>Harsha Sharma</dc:creator><description>&lt;p&gt;In order to perform the update operation,the primary key- employeeId- should not be null.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Pass in the context for EmpLeave cdt when the form loads. This way when the form loads EmpLeave will not be empty but will be populated with the data in all fields including the Id one. That will resolve the issue. By passing the data for rule input, you can use the same CDT to populate Employee Details section as well instead of calling the query rule to return the employeeDetails again.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So from wherever you are calling this interface pass in the input as rule!ELT_getEmployeeDetailsByUser(loggedInUser()) against EmpLeave rule input.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>