Skip to main content

Trouble with #compare handlebar



  • Cory Anderson
    Answer Pro
    Great Answer
    Awesome Follow-up
    Celigo University Level 4: Legendary

    Update on this - changed the expression to:

    {{#compare L5[*].ORDERED PART "==" L5[*].SHIPPED PART}}{{L5.[*].SHIPPED PART}}{{/compare}}

    Now the error is:

    "Could not compile handle bar \"{{#compare L5.[0].ORDERED PART \"==\" L5.[0].SHIPPED PART}}{{L5.[*].SHIPPED PART}}{{/compare}}\" because \"helper {{compare}}: invalid operator: `undefined`\" .Please correct and retry"

  • Kate Larson Community moderator Principal Technical Writer
    Celigo University Level 3: Master

    Hi Cory Anderson,

    Thanks for posting to the community! I checked with one of our handlebars experts. He says the issue is that you're using wildcards in your expression. You'll need to specify the exact indices for the values you want to match. I hope that helps!



Please sign in to leave a comment.