<?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>want to remove status and subStatus from the given data ..</title><link>https://community.appian.com/discussions/f/general/37891/want-to-remove-status-and-substatus-from-the-given-data</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: want to remove status and subStatus from the given data ..</title><link>https://community.appian.com/thread/142478?ContentTypeID=1</link><pubDate>Tue, 05 Nov 2024 07:47:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:26019c59-7e1a-49b0-8ac3-50f5c749b19f</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;A very compact solution to your problem. Please check the documentation for a!keys(), a!update(), reduce(), merge() and apply().&lt;/p&gt;
&lt;p&gt;The idea is to create a new map from scratch and copy only the required fields from the old map.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!data: {
      requestTypeId: {
        description: &amp;quot;Request Type Unique Identifier&amp;quot;,
        type: &amp;quot;integer&amp;quot;,
        questionSet: &amp;quot;global&amp;quot;,
        required: true,
        typedesc: &amp;quot;Text&amp;quot;
      },
      automationId: {
        description: &amp;quot;Automat Recipe or Campaign Builder Id&amp;quot;,
        type: &amp;quot;string&amp;quot;,
        questionSet: &amp;quot;global&amp;quot;,
        required: true,
        typedesc: &amp;quot;Text&amp;quot;
      },
      status: {
        description: &amp;quot;Automation Source&amp;quot;,
        type: &amp;quot;integer&amp;quot;,
        questionSet: &amp;quot;global&amp;quot;,
        enum: { 157, 158, 159, 160, 161, 162, 163 },
        enumLabels: {
          &amp;quot;Automat&amp;quot;,
          &amp;quot;Crossroads&amp;quot;,
          &amp;quot;Member Web&amp;quot;,
          &amp;quot;Public Directory&amp;quot;,
          &amp;quot;Member App&amp;quot;,
          &amp;quot;Provider Portal&amp;quot;,
          &amp;quot;Faxblast&amp;quot;
        },
        typedesc: &amp;quot;Single-Select&amp;quot;
      },
      subStatus: {
        description: &amp;quot;Reported On Date / Time (format: YYYY-mm-DDTHH:MM:SS)&amp;quot;,
        type: &amp;quot;string&amp;quot;,
        questionSet: &amp;quot;global&amp;quot;,
        typedesc: &amp;quot;Date and Time&amp;quot;
      },
      contactPhoneNumber: {
        description: &amp;quot;Contact Phone Number&amp;quot;,
        type: &amp;quot;string&amp;quot;,
        questionSet: &amp;quot;global&amp;quot;,
        typedesc: &amp;quot;Text&amp;quot;
      },
      contactEmail: {
        description: &amp;quot;Contact Email&amp;quot;,
        type: &amp;quot;string&amp;quot;,
        questionSet: &amp;quot;global&amp;quot;,
        typedesc: &amp;quot;Text&amp;quot;
      },
      dctLink: {
        description: &amp;quot;DCT Link&amp;quot;,
        type: &amp;quot;string&amp;quot;,
        questionSet: &amp;quot;global&amp;quot;,
        typedesc: &amp;quot;Text&amp;quot;
      },
      insuranceMarket: {
        description: &amp;quot;Insurance Market&amp;quot;,
        type: &amp;quot;string&amp;quot;,
        questionSet: &amp;quot;global&amp;quot;,
        enum: {
          &amp;quot;Individual&amp;quot;,
          &amp;quot;Medicare Advantage&amp;quot;,
          &amp;quot;Self Insured&amp;quot;,
          &amp;quot;Small Group&amp;quot;
        },
        enumLabels: {
          &amp;quot;Individual&amp;quot;,
          &amp;quot;Medicare Advantage&amp;quot;,
          &amp;quot;Self Insured&amp;quot;,
          &amp;quot;Small Group&amp;quot;
        },
        typedesc: &amp;quot;Single-Select&amp;quot;
      }
    },
  local!reducedFields: difference(a!keys(local!data), {&amp;quot;status&amp;quot;, &amp;quot;subStatus&amp;quot;}),
  reduce(
    a!update(_,_,_),
    a!map(), /* Start with an empty list */
    merge( /* Create a list of tuples containing the field name and the field&amp;#39;s value */
      local!reducedFields,
      apply(index(local!data,_,null), local!reducedFields)
    )
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: want to remove status and subStatus from the given data ..</title><link>https://community.appian.com/thread/142477?ContentTypeID=1</link><pubDate>Tue, 05 Nov 2024 07:37:26 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:bee026af-e728-453d-91ee-e6b60c9b15c7</guid><dc:creator>Harman</dc:creator><description>&lt;p&gt;a!localVariables(&lt;br /&gt; local!keys: a!keys(ri!data[1]),&lt;br /&gt; a!forEach(&lt;br /&gt; items: remove(&lt;br /&gt; { local!keys },&lt;br /&gt; wherecontains({ &amp;quot;status&amp;quot;, &amp;quot;subStatus&amp;quot; }, local!keys)&lt;br /&gt; ),&lt;br /&gt; expression: index(ri!data[1], fv!item, {})&lt;br /&gt; )&lt;br /&gt;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>