<?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>Validations Query</title><link>https://community.appian.com/discussions/f/user-interface/22719/validations-query</link><description>I Create a validation query that check if the emails exist in the RDBMS, if email does not exist the validation shown like this, 
 but I struggle in the multiple message because I used a!foreach for that. How this text make as one only?</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Validations Query</title><link>https://community.appian.com/thread/88873?ContentTypeID=1</link><pubDate>Thu, 09 Dec 2021 09:48:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c85fd678-7d82-412d-8536-1008538416e6</guid><dc:creator>Rill</dc:creator><description>&lt;p&gt;Thanks TJ, it working now&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Validations Query</title><link>https://community.appian.com/thread/88872?ContentTypeID=1</link><pubDate>Thu, 09 Dec 2021 09:48:04 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fb3bfeae-d537-4843-a0a0-276cddc29e51</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;OK. It seems that you load all email addresses into the interface and then try to compare each to the value entered. Is that correct?&lt;/p&gt;
&lt;p&gt;If yes, please create a query which searches in DB for the entered value. In case there is no result, you know that the email does not exist.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Validations Query</title><link>https://community.appian.com/thread/88871?ContentTypeID=1</link><pubDate>Thu, 09 Dec 2021 09:45:23 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2de4f51c-ee46-4fb9-87ca-4bc16d946752</guid><dc:creator>Rill</dc:creator><description>&lt;p&gt;it&amp;#39;s a query to DB, if the entered email exist the validation doesn&amp;#39;t shown, but if the entered email not exist, the validation show to remind the user the email they entered does not exist. when I use foreach it show the error multiple base on my data I have on the DB&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Validations Query</title><link>https://community.appian.com/thread/88869?ContentTypeID=1</link><pubDate>Thu, 09 Dec 2021 09:41:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1501cb75-6c4d-4d35-8fab-b40051eaf7fb</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Seem like you want to check whether the entered email address is contained in the list ri!email. Is that correct?&lt;/p&gt;
&lt;p&gt;Is that a static list or data from DB? In case of DB, I would do a query to DB trying to find a match.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Validations Query</title><link>https://community.appian.com/thread/88863?ContentTypeID=1</link><pubDate>Thu, 09 Dec 2021 09:27:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3f219969-0383-4348-b0f4-72964eeaafd2</guid><dc:creator>gayathris876948</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Try like&amp;nbsp; this&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;if(
isnull(rule!checkEmails(emails: ri!email)),
&amp;quot;Couldn&amp;#39;t find your account&amp;quot;,
&amp;quot;&amp;quot;
)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;foreach can be used only if you want to check for multiple items from your image I can see user gonna type is single email only.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Validations Query</title><link>https://community.appian.com/thread/88862?ContentTypeID=1</link><pubDate>Thu, 09 Dec 2021 09:22:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:015578be-137b-4c45-ac60-d505441f5b25</guid><dc:creator>Rill</dc:creator><description>&lt;p&gt;validations : a!foreach( items: rule!checkEmails(emails: ri!email),&lt;br /&gt;expression: if(fv!item.emails = ri!emails, null, &amp;quot;Couldn&amp;#39;t find your account&amp;quot;)) Here&amp;#39;s my actual code&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Validations Query</title><link>https://community.appian.com/thread/88842?ContentTypeID=1</link><pubDate>Thu, 09 Dec 2021 06:45:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f2ed3de9-66c3-4a47-9062-c6d3c1ba4e02</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;I also would be interested in the actual code. I try to understand what the purpose of the forEach() is.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Validations Query</title><link>https://community.appian.com/thread/88840?ContentTypeID=1</link><pubDate>Thu, 09 Dec 2021 06:11:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:62326b1b-eb94-4af8-9931-d2d33d50b015</guid><dc:creator>TJ</dc:creator><description>&lt;p&gt;Try replacing the text &amp;quot;Couldn&amp;#39;t find your Account&amp;quot; with true() and wrap the a!foreach() with or() to check if any of the emails are not in the database.&lt;/p&gt;
&lt;p&gt;So if your condition is&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Validation: &lt;strong&gt;a!foreach(array, if(fv!item not in database, &amp;quot;Couldn&amp;#39;t find your Account&amp;quot;, null)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Replace it as:&lt;/p&gt;
&lt;p&gt;Validation: if(or(&lt;strong&gt;a!foreach(array,if(fv!item not in database, true, false)&lt;/strong&gt;) = true, &amp;quot;Couldn&amp;#39;t find your Account&amp;quot;,null)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Validations Query</title><link>https://community.appian.com/thread/88835?ContentTypeID=1</link><pubDate>Thu, 09 Dec 2021 04:21:32 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3a178e70-da18-44f1-beff-5ce675c299e3</guid><dc:creator>ajhick</dc:creator><description>&lt;p&gt;What&amp;#39;s your code?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>