Condition comment

BankVillage LLC=I need this line to show when BRAND= USA and Letternumber=CFPBPB

here what I have created but not effect: if (record.fields[“BRAND”] !=“USA” || record.fields[“LETTERCODE”] !=“CFPBPB” ) { results.hide();}

Please advise

Hi Katie,

in the code you provided you are using or “||” in the condition. This will mean that the condition will be true if Brand is not equal to “USA” OR lettercode is not equal to “CFPBPB” . I’d recommend joining the two parts of the condition with and ‘&&’ as shown below.

if (record.fields[“BRAND”] !=“USA” && record.fields[“LETTERCODE”] !=“CFPBPB” ) { results.hide();}