Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
LLockwood1601995176
Contributor
Contributor

Using Sum JSONpath operation in cmessagerouter trigger

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.

 

The first image shows a flow of the route as expected along with an attempted Jsonpath expression.

 

The 2nd image shows the JSON file and the fields the JSONpath expression should be operating against.

 

The expressions I have tried are:

"$.sum[?(@.AWARD.AWARDLINE.OBLIGATEDAMT == '0')]"

 

 "$.sum($.AWARD.AWARDLINE[?(@.OBLIGATEDAMT == 0)].OBLIGATEDAMT)"

Labels (5)
0 Replies