<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Using Sum JSONpath operation in cmessagerouter trigger in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Using-Sum-JSONpath-operation-in-cmessagerouter-trigger/m-p/2368205#M131498</link>
    <description>&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am attempting to have a JSON payload be directed based on the sum of values in a JSON array. I want the cmessagerouter to take the sum of multiple elements and if it equals 0 then the payload should flow that way. If the OBLIGATEDAMT fields all sum up to 0, then they should flow the directed way in the image below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first image shows a flow of the route as expected along with an attempted Jsonpath expression. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The 2nd image shows the JSON file and the fields the JSONpath expression should be operating against.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expressions I have tried are:  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"$.sum[?(@.AWARD.AWARDLINE.OBLIGATEDAMT == '0')]"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;"$.sum($.AWARD.AWARDLINE[?(@.OBLIGATEDAMT == 0)].OBLIGATEDAMT)"&lt;/P&gt;</description>
    <pubDate>Fri, 15 Nov 2024 23:42:15 GMT</pubDate>
    <dc:creator>LLockwood1601995176</dc:creator>
    <dc:date>2024-11-15T23:42:15Z</dc:date>
    <item>
      <title>Using Sum JSONpath operation in cmessagerouter trigger</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-Sum-JSONpath-operation-in-cmessagerouter-trigger/m-p/2368205#M131498</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am attempting to have a JSON payload be directed based on the sum of values in a JSON array. I want the cmessagerouter to take the sum of multiple elements and if it equals 0 then the payload should flow that way. If the OBLIGATEDAMT fields all sum up to 0, then they should flow the directed way in the image below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first image shows a flow of the route as expected along with an attempted Jsonpath expression. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The 2nd image shows the JSON file and the fields the JSONpath expression should be operating against.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expressions I have tried are:  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"$.sum[?(@.AWARD.AWARDLINE.OBLIGATEDAMT == '0')]"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;"$.sum($.AWARD.AWARDLINE[?(@.OBLIGATEDAMT == 0)].OBLIGATEDAMT)"&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 23:42:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-Sum-JSONpath-operation-in-cmessagerouter-trigger/m-p/2368205#M131498</guid>
      <dc:creator>LLockwood1601995176</dc:creator>
      <dc:date>2024-11-15T23:42:15Z</dc:date>
    </item>
  </channel>
</rss>

