<?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>Can I execute a if statement in Query Database</title><link>https://community.appian.com/discussions/f/process/24230/can-i-execute-a-if-statement-in-query-database</link><description>Hi Team 
 I have a requirement where I need to generate different update query statements for different tables depending on some conditions in a process model. Do we have any feature to implement this? I do not want to use a XOR gate and create different</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Can I execute a if statement in Query Database</title><link>https://community.appian.com/thread/93464?ContentTypeID=1</link><pubDate>Mon, 11 Apr 2022 07:55:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:eddec416-9e73-4614-9dc9-5fc21b787ccc</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;The Write to multiple Datastore Entities Node can update multiple tables in one go. Using a!entityData() you can create a list of items to be written to multiple tables.&lt;/p&gt;
&lt;p&gt;Depending on your confidence in your Appian skills, the idea of&amp;nbsp;&lt;a href="/members/stewart.burchell"&gt;Stewart Burchell&lt;/a&gt; might be a better option.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I execute a if statement in Query Database</title><link>https://community.appian.com/thread/93463?ContentTypeID=1</link><pubDate>Mon, 11 Apr 2022 07:51:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b3e872ef-896d-4412-88c0-5b3508b7b24f</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;I&amp;#39;m not sure why you wouldn&amp;#39;t have an XOR that routes the processing to the appropriate Write to Datastore node. If the tables are different with different structures then you gain no benefit from trying to unify them in any way. Treat them as distinct entities and route your process flow accordingly.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I execute a if statement in Query Database</title><link>https://community.appian.com/thread/93461?ContentTypeID=1</link><pubDate>Mon, 11 Apr 2022 07:48:06 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e17791e7-7d6a-4271-9c41-e01338b08882</guid><dc:creator>SS</dc:creator><description>&lt;p&gt;Hi Stefan,&lt;br /&gt;&lt;br /&gt;My condition would be something similar in the rule expression :&amp;nbsp;&lt;br /&gt;&lt;br /&gt; if (field 1 =&amp;quot;Test&amp;quot;,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;update table1 set table_col=ac!value where primarykey=ac!key,&lt;/p&gt;
&lt;p&gt;if (field 1 =&amp;quot;Test1&amp;quot;,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;update table2 set table_col=ac!value where primarykey=ac!key,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;null))&lt;br /&gt;&lt;br /&gt;table1 and table2 are two different tables with different structures.&lt;br /&gt;We may have more columns in set values and where clause&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I execute a if statement in Query Database</title><link>https://community.appian.com/thread/93459?ContentTypeID=1</link><pubDate>Mon, 11 Apr 2022 07:44:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d7e0927d-1504-4088-98c4-5155983dfe3c</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;You can write an expression rule which creates a list of CDTs which can be inserts and updates based on input data.&lt;/p&gt;
&lt;p&gt;Can you share a few more details?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>