Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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