<?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>Query Database Passing a parameter using IN Condition</title><link>https://community.appian.com/discussions/f/plug-ins/23344/query-database-passing-a-parameter-using-in-condition</link><description>Hi All, 
 Did anyone tried passing the parameter as in condition for a query database smart service 
 
 For example : update tablename set status=&amp;quot;test1&amp;quot; where case_id in ac!caseId 
 
 How to pass the case ID values of multiple and what is the type of</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Query Database Passing a parameter using IN Condition</title><link>https://community.appian.com/thread/89700?ContentTypeID=1</link><pubDate>Thu, 13 Jan 2022 06:42:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:de7dda17-249f-4f7b-a581-5797d376de14</guid><dc:creator>agam</dc:creator><description>&lt;p&gt;This would work for dynamic values as well. You could use any pv variable to define the acp.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;How many taskIds are you expecting? I would suggest doing some testing on your end on these large set of id&amp;#39;s&lt;/p&gt;
&lt;p&gt;however, I don&amp;#39;t see any major concerns.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Query Database Passing a parameter using IN Condition</title><link>https://community.appian.com/thread/89697?ContentTypeID=1</link><pubDate>Thu, 13 Jan 2022 04:43:03 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3be7112f-cb08-4883-be65-a3ac508ca549</guid><dc:creator>harshav</dc:creator><description>&lt;p&gt;Hi &lt;a href="/members/agamb0001"&gt;agam&lt;/a&gt; Just as a confirmation this will work for dynamic values (i mean passing the values into the ac from a process variable) and the list of taskIds are huge .. and this shouldnt be a problem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Query Database Passing a parameter using IN Condition</title><link>https://community.appian.com/thread/89678?ContentTypeID=1</link><pubDate>Wed, 12 Jan 2022 13:29:44 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b2625beb-17a8-4377-9766-aa20b857c492</guid><dc:creator>agam</dc:creator><description>&lt;p&gt;thanks harshav. this should work in mariadb as well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Query Database Passing a parameter using IN Condition</title><link>https://community.appian.com/thread/89677?ContentTypeID=1</link><pubDate>Wed, 12 Jan 2022 13:25:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d3d3eaf4-9d24-4eaf-81fa-18c26840e603</guid><dc:creator>harshav</dc:creator><description>&lt;p&gt;We are using MariaDB in Cloud version &lt;a href="/members/agamb0001"&gt;agam&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Query Database Passing a parameter using IN Condition</title><link>https://community.appian.com/thread/89676?ContentTypeID=1</link><pubDate>Wed, 12 Jan 2022 13:21:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7dee9d67-d1d2-46f6-bda9-3bab68bcf75b</guid><dc:creator>agam</dc:creator><description>&lt;p&gt;Sure. Whenever you want.&lt;/p&gt;
&lt;p&gt;If it doesn&amp;#39;t work, can you confirm that you are using mysql and let me know how you are configuring the node with similar screenshots&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Query Database Passing a parameter using IN Condition</title><link>https://community.appian.com/thread/89675?ContentTypeID=1</link><pubDate>Wed, 12 Jan 2022 13:19:48 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2a11ac56-12c5-4f75-98fc-9c6ac3ee68ac</guid><dc:creator>harshav</dc:creator><description>&lt;p&gt;Hi &lt;a href="/members/agamb0001"&gt;agam&lt;/a&gt; is it ok if i try tomorrow in the real scenario and let you know so that you can help us if there anything required. i would reply to the same chain &lt;span class="emoticon" data-url="https://community.appian.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Query Database Passing a parameter using IN Condition</title><link>https://community.appian.com/thread/89674?ContentTypeID=1</link><pubDate>Wed, 12 Jan 2022 13:14:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1b6c1e75-c664-4186-9989-5ed03ec65138</guid><dc:creator>agam</dc:creator><description>&lt;p&gt;well, It worked for me for multiple values as well.&lt;/p&gt;
&lt;p&gt;Here are some screenshots of how I configured.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/19/pastedimage1641993160169v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/19/pastedimage1641993183914v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;and I verified the table values were updated as well&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/19/pastedimage1641993240494v3.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Query Database Passing a parameter using IN Condition</title><link>https://community.appian.com/thread/89673?ContentTypeID=1</link><pubDate>Wed, 12 Jan 2022 13:10:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:320a1a94-9cd5-4a54-bbd9-906ac55bbabd</guid><dc:creator>harshav</dc:creator><description>&lt;p&gt;Hi &lt;a href="/members/agamb0001"&gt;agam&lt;/a&gt; we tried like this and it didnt work for multiple values. can you help in any other way&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Query Database Passing a parameter using IN Condition</title><link>https://community.appian.com/thread/89672?ContentTypeID=1</link><pubDate>Wed, 12 Jan 2022 13:05:44 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:705defba-dcf2-4033-a768-e2051d24351d</guid><dc:creator>agam</dc:creator><description>&lt;p&gt;If you are using mysql, then you can use a query like:&lt;/p&gt;
&lt;p&gt;UPDATE &lt;span&gt;tablename&amp;nbsp;&amp;nbsp;&lt;/span&gt;SET &lt;span&gt;status=&amp;quot;test1&amp;quot;&amp;nbsp;&lt;/span&gt;WHERE FIND_IN_SET(&lt;span&gt;case_id&lt;/span&gt;, ac!caseId)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;and the ac!caseId can be set to:&lt;/p&gt;
&lt;p&gt;joinarray(pv!caseIds, &amp;quot;,&amp;quot;)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;where pv!caseIds can be your case id&amp;#39;s (I assumed its of type number integer - multiple)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>