<?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>How to extend array with attributes</title><link>https://community.appian.com/discussions/f/data/26761/how-to-extend-array-with-attributes</link><description>Hello guys, in my database ICH_Contracts i have information about my master contract saved in several attributes. In my process model this is saved as a porcess variable: 
 contracts = [startYear=2023, startMonth=1, noOfOccurences=5, isCancelled=N, frequency</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to extend array with attributes</title><link>https://community.appian.com/thread/105088?ContentTypeID=1</link><pubDate>Fri, 02 Dec 2022 14:03:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9ca1a312-ea28-4bff-92b0-1247d28c6e46</guid><dc:creator>ladislavm0002</dc:creator><description>&lt;p&gt;thanks, it worked out&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to extend array with attributes</title><link>https://community.appian.com/thread/105051?ContentTypeID=1</link><pubDate>Thu, 01 Dec 2022 16:51:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d1ac99f3-0d1e-493c-ad9d-ce49d94b60a7</guid><dc:creator>Alex Boerescu</dc:creator><description>&lt;p&gt;Write&amp;nbsp;something like this in a Script task, save the result in an output parameter and feed it in a Write Records/Write to Data Store&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!childcontractsnumber: {
    &amp;quot;FY2300000176_1&amp;quot;,
    &amp;quot;FY2300000176_2&amp;quot;,
    &amp;quot;FY2300000176_3&amp;quot;,
    &amp;quot;FY2300000176_4&amp;quot;,
    &amp;quot;FY2300000176_5&amp;quot;
  },
  local!contract: {{
    startYear: 2023,
    startMonth: 1,
    noOfOccurences: 5,
    contractNumber: &amp;quot;FY2300000176&amp;quot;}
  },
  local!extendedChildContractsList: a!forEach(
    items: local!childcontractsnumber,
    expression: {
      {
        contractNumber: fv!item,
        startYear: local!contract[1].startYear,
        startMonth: local!contract[1].startMonth,
        noOfOccurences: local!contract[1].noOfOccurences
      }
    }
  ),
  append(local!contract,local!extendedChildContractsList)
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>