<?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>convert a!query to value to be saved</title><link>https://community.appian.com/discussions/f/new-to-appian/21842/convert-a-query-to-value-to-be-saved</link><description>seems I almost there, the problem I found is that the value i supposed to be saved for a!query is not the standard form. What should be the correct one?</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: convert a!query to value to be saved</title><link>https://community.appian.com/thread/85666?ContentTypeID=1</link><pubDate>Fri, 10 Sep 2021 13:02:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0b03e911-6357-4e96-a2b9-962a2d2d7396</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;you either have to re-save all columns along with the changed one (making sure to correctly populate them in your CDT first), or if your need is strong enough, you can instead create a separate CDT that contains only the columns for the table Primary Key ID, and the column(s) you want to change.&amp;nbsp; I advise only going with this solution when the use for it in your system will be very common, as it creates extra setup and maintenance hassles.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: convert a!query to value to be saved</title><link>https://community.appian.com/thread/85636?ContentTypeID=1</link><pubDate>Fri, 10 Sep 2021 03:29:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:32c201ac-01d8-43bd-81cb-8465391b5ac2</guid><dc:creator>immortalvirgil</dc:creator><description>&lt;p&gt;I solved this already, I have another question not sure whether you have been faced before, Whenever i want to update the row value of database, i enlist them out in editable grid, however, if i want just update one column of value but have to resave others column of value again, or just this column value get updated, others column all change to be null.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: convert a!query to value to be saved</title><link>https://community.appian.com/thread/85628?ContentTypeID=1</link><pubDate>Thu, 09 Sep 2021 11:56:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f5c98324-3332-411d-a2ba-18dada0e5220</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Your query is attempting to look up the user ID of the database entry(s) matching `&lt;span style="font-family:courier new, courier;"&gt;ri!userinputsheet.kone_user_name&lt;/span&gt;`.&amp;nbsp; I&amp;#39;m trying to discern what your use case is exactly, and that includes how the value of this is initialized.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: convert a!query to value to be saved</title><link>https://community.appian.com/thread/85616?ContentTypeID=1</link><pubDate>Thu, 09 Sep 2021 03:35:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7d4ccd51-9da2-4b85-b1e3-9f1b92f25d3f</guid><dc:creator>immortalvirgil</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;  a!forEach(
            items:rule!KONE_Development_Username_UserId(),
            expression:if(fv!item.NAME=ri!userinputsheet.KONE_user_name,
            a!save(target:ri!userrole.USER_ID,value:fv!item.USER_ID),{}
            )
          ),
          
          
rule as:
 a!queryEntity(
   entity: cons!KONE_Development_userrole_Constant,
   query: a!query(
     pagingInfo: a!pagingInfo(
       startIndex: 1,
       batchSize: 50,
     ),         
     aggregation:a!queryAggregation(
       aggregationcolumns:{
         a!queryAggregationColumn(field:&amp;quot;NAME&amp;quot;,alias:&amp;quot;username&amp;quot;,isGrouping:true),
         a!queryAggregationColumn(field:&amp;quot;USER_ID&amp;quot;,alias:&amp;quot;userid&amp;quot;,isGrouping:true),
       }
     )
   ),
 ).data
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;But not working either.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: convert a!query to value to be saved</title><link>https://community.appian.com/thread/85614?ContentTypeID=1</link><pubDate>Thu, 09 Sep 2021 01:40:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cc0bfa4c-48fa-4e55-91a3-4ac098176c83</guid><dc:creator>immortalvirgil</dc:creator><description>&lt;p&gt;what do you mean, I did in the rule input&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: convert a!query to value to be saved</title><link>https://community.appian.com/thread/85598?ContentTypeID=1</link><pubDate>Wed, 08 Sep 2021 16:58:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4842d737-fc24-4572-ae27-ffaea788cbbe</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Why are you doing this in this spot, exactly?&amp;nbsp; And how (and when) does the value of `&lt;span style="font-family:courier new, courier;"&gt;ri!userinputsheet.kone_user_name&lt;/span&gt;` get set?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: convert a!query to value to be saved</title><link>https://community.appian.com/thread/85587?ContentTypeID=1</link><pubDate>Wed, 08 Sep 2021 08:54:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6c2aed69-3d9f-4771-b2fd-2fd74df0efab</guid><dc:creator>immortalvirgil</dc:creator><description>&lt;p&gt;target:ri!userrole.USER_ID,&lt;br /&gt; value:a!forEach(&lt;br /&gt; items:rule!KONE_Development_Username_UserId(),&lt;br /&gt; expression:if(fv!item.username=ri!userinputsheet.KONE_user_name,&lt;br /&gt; fv!item.userid,{})&lt;br /&gt; )&lt;/p&gt;
&lt;p&gt;I did both way but neither is work&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: convert a!query to value to be saved</title><link>https://community.appian.com/thread/85585?ContentTypeID=1</link><pubDate>Wed, 08 Sep 2021 08:06:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:90a54e32-05fd-46bd-999f-64f4813f07c9</guid><dc:creator>immortalvirgil</dc:creator><description>&lt;p&gt;Then how i am able to configure the username match to its userid?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: convert a!query to value to be saved</title><link>https://community.appian.com/thread/85584?ContentTypeID=1</link><pubDate>Wed, 08 Sep 2021 08:06:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cc226c60-6bad-4968-8d60-0b87f9b69890</guid><dc:creator>immortalvirgil</dc:creator><description>&lt;p&gt;i have if judgement if the value is null but i didn&amp;#39;t put it in here&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: convert a!query to value to be saved</title><link>https://community.appian.com/thread/85583?ContentTypeID=1</link><pubDate>Wed, 08 Sep 2021 08:04:43 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:720b242a-58ae-4472-8b54-1f47067adea5</guid><dc:creator>Marco Amador</dc:creator><description>&lt;p&gt;In general I would say you should avoid having a queryEntity inside a saveInto. If the query fails or does not retrieve the results you expect (since you are using a batchSize of 50 for it), you will be saving the wrong values into USER_ID without a good way to debug it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: convert a!query to value to be saved</title><link>https://community.appian.com/thread/85582?ContentTypeID=1</link><pubDate>Wed, 08 Sep 2021 08:02:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:71aa8c60-a51e-4add-b86d-cfef7d53c389</guid><dc:creator>immortalvirgil</dc:creator><description>&lt;p&gt;I think i have to trim the bracket&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>