AnsweredAssumed Answered

check condition in handlebar template

Question asked by Doddy Amijaya on Jul 6, 2017
Latest reply on Jul 6, 2017 by Francesca Shiekh

I have a dashlet that retrieve records from external source. 

what I want to do is to highlight the field if the value in the SugarCRM <> in the external source.


the object that I got in the external source inside the object entries. I also have the existing value for that record in the currentVal object. 



<div class="forecast-details">
{{#each entries}}

<div class="row-fluid">
<input style="margin:10px;" type="button" name="update_record" class="btn btn-primary" value="Update SugarCRM Record"/>

<div class="row-fluid">
<span class="span3">
<p>Account Name: </p>
<span name="account-name" class="span6 tcenter">
<p> {{name}} </p>

I tried the {if {{name}} <> {{}} } or  {if {{name}} != {{}} }

but no dice. in fact I cannot print any value in the currentVal object while I'm inside the #each bracket of the entries object.

can anyone help?Francesca Shiekh