<?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>append</title><link>https://community.appian.com/discussions/f/general/34098/append</link><description>i&amp;#39;ll get list of data from one query, to that query data i have to map few fields value 
 ex query1 gives : 
 id :54, abc, class: B, owner :xyz 
 from second query from another table will get 
 id:54, owner :abc 
 this second query owner data needs to</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: append</title><link>https://community.appian.com/thread/130593?ContentTypeID=1</link><pubDate>Tue, 05 Mar 2024 07:51:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4ca23c88-cc54-4dc5-a727-7d01167b61e2</guid><dc:creator>thammireddybinduniharika</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!query1Result: {
    a!map(id: 54, class: &amp;quot;B&amp;quot;, owner: &amp;quot;xyz&amp;quot;),
    a!map(id: 55, class: &amp;quot;C&amp;quot;, owner: &amp;quot;abc&amp;quot;),
    a!map(id: 56, class: &amp;quot;D&amp;quot;, owner: &amp;quot;mno&amp;quot;),
    a!map(id: 57, class: &amp;quot;E&amp;quot;, owner: &amp;quot;ghi&amp;quot;)
  },
  local!query2Result: {
    a!map(id: 54, owner: &amp;quot;help&amp;quot;),
    a!map(id: 57, class: &amp;quot;F&amp;quot;)
  },
  local!getIndex: cast(
    typeof({ 1 }),
    index(local!query2Result, &amp;quot;id&amp;quot;, null)
  ),
  a!forEach(
    items: local!query1Result,
    expression: if(
      contains(
        local!getIndex,
        tointeger(index(fv!item, &amp;quot;id&amp;quot;, null)),

      ),
      a!localVariables(
        local!data:index(
          local!query2Result,
          wherecontains(
            tointeger(index(fv!item, &amp;quot;id&amp;quot;, null)),
            local!getIndex
          )
        ),
        local!keys: a!keys(
         cast(typeof(a!map()), 
         index(
            local!query2Result,
            wherecontains(
              tointeger(index(fv!item, &amp;quot;id&amp;quot;, null)),
              local!getIndex
            )
          )
         )
        ),
        a!update(
         data: local!data,
        index:  local!keys,
         value:touniformstring(index(
           fv!item,
           {local!keys}
         ))
        )
      ),
      fv!item
    )
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: append</title><link>https://community.appian.com/thread/130566?ContentTypeID=1</link><pubDate>Tue, 05 Mar 2024 06:27:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:59467db8-cdf4-44b1-b6b9-b4ef78269f09</guid><dc:creator>ZinniaHendricks</dc:creator><description>&lt;p&gt;I also wanted to ask the same, thank you so much. Thanks for answering, you made my day. While searching for it online, I also found &lt;a href="https://academized.com/write-my-case-study"&gt;academized.com/write-my-case-study&lt;/a&gt; website link where I found an essay writer who will write my case study for me by taking some money. Now, I won&amp;#39;t take to much time to write my essay assignments.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: append</title><link>https://community.appian.com/thread/129776?ContentTypeID=1</link><pubDate>Tue, 20 Feb 2024 12:01:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fbbe170c-8829-467c-965e-fc15ddfb57b5</guid><dc:creator>Dhananjay Kumar</dc:creator><description>&lt;p&gt;As Stewart said, we are supposed to use a!update () function but if its just one value updating you can use as suggested below but if its many and you want all of them to happen in one single logic then here you go: -&lt;br /&gt;&lt;br /&gt;a!localVariables(&lt;br /&gt; local!query1Result: {&lt;br /&gt; a!map(id: 54, class: &amp;quot;B&amp;quot;, owner: &amp;quot;xyz&amp;quot;),&lt;br /&gt; a!map(id: 55, class: &amp;quot;C&amp;quot;, owner: &amp;quot;abc&amp;quot;),&lt;br /&gt; a!map(id: 56, class: &amp;quot;D&amp;quot;, owner: &amp;quot;mno&amp;quot;),&lt;br /&gt; a!map(id: 57, class: &amp;quot;E&amp;quot;, owner: &amp;quot;ghi&amp;quot;)&lt;br /&gt; },&lt;br /&gt; local!query2Result: { a!map(id: 54, owner: &amp;quot;help&amp;quot;), a!map(id: 57) },&lt;br /&gt; a!forEach(&lt;br /&gt; items: local!query1Result,&lt;br /&gt; expression: a!localVariables(&lt;br /&gt; local!toUpdateIndex: wherecontains(&lt;br /&gt; tointeger(index(fv!item, &amp;quot;id&amp;quot;, null)),&lt;br /&gt; tointeger(index(local!query2Result, &amp;quot;id&amp;quot;, null))&lt;br /&gt; ),&lt;br /&gt; local!toDo: if(&lt;br /&gt; a!isNullOrEmpty(local!toUpdateIndex),&lt;br /&gt; {},&lt;br /&gt; index(&lt;br /&gt; local!query2Result,&lt;br /&gt; local!toUpdateIndex,&lt;br /&gt; null&lt;br /&gt; )&lt;br /&gt; ),&lt;br /&gt; if(&lt;br /&gt; a!isNullOrEmpty(local!toDo),&lt;br /&gt; fv!item,&lt;br /&gt; a!update(&lt;br /&gt; fv!item,&lt;br /&gt; &amp;quot;owner&amp;quot;,&lt;br /&gt; a!defaultValue(&lt;br /&gt; tostring(index(local!toDo, &amp;quot;owner&amp;quot;, null)),&lt;br /&gt; tostring(index(fv!item, &amp;quot;owner&amp;quot;, null))&lt;br /&gt; )&lt;br /&gt; )&lt;br /&gt; )&lt;br /&gt; )&lt;br /&gt; )&lt;br /&gt;)&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/11/Appian_5F00_Append.png" alt=" " /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: append</title><link>https://community.appian.com/thread/129775?ContentTypeID=1</link><pubDate>Tue, 20 Feb 2024 11:45:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d4a0f99f-dce5-4e38-be3e-a74d021014b0</guid><dc:creator>KM</dc:creator><description>&lt;p&gt;if query1 has list, like&lt;/p&gt;
&lt;p&gt;id :54, class: b, owner :&amp;quot;xyz&lt;/p&gt;
&lt;p&gt;id:54, class:a, owner:&amp;quot;pqr&lt;/p&gt;
&lt;p&gt;in this case i have to update id=54 and class : b owner then how can i write&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: append</title><link>https://community.appian.com/thread/129773?ContentTypeID=1</link><pubDate>Tue, 20 Feb 2024 11:38:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:50cc4d6b-844b-4ad6-80d2-6424c0c522d7</guid><dc:creator>Mathieu Drouin</dc:creator><description>&lt;p&gt;You could also do a custom record field based on the relationship between the Record used in query 1 and the Record used in query 2.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.appian.com/suite/help/23.4/fnc_crf_customfielddefaultvalue.html"&gt;docs.appian.com/.../fnc_crf_customfielddefaultvalue.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: append</title><link>https://community.appian.com/thread/129772?ContentTypeID=1</link><pubDate>Tue, 20 Feb 2024 11:32:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ce17a9a8-0878-4d3a-9c6a-f8a02fa721b7</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;You can use the a!update() function, something&amp;nbsp;like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!query1Result: a!map(id: 54, class: &amp;quot;B&amp;quot;, owner: &amp;quot;xyz&amp;quot;),
  local!query2Result: a!map(id: 54, owner: &amp;quot;abc&amp;quot;),
  a!update(
    local!query1Result,
    &amp;quot;owner&amp;quot;,
    local!query2Result.owner
  )
)&lt;/pre&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>