Skip to main content

Trouble with #compare handlebar

Comments

2 comments

  • Cory Anderson
    Answer Pro
    Great Answer
    Awesome Follow-up
    Engaged
    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"

    0
  • 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!

     

    0

Please sign in to leave a comment.