Skip to main content
Answer

Value = 0 if it contains EWT

  • October 7, 2024
  • 1 reply
  • 38 views

Forum|alt.badge.img

 

What is the problem with my code all the other with ewt is already not shown but still there is one that is showing 


i already fix this hahhahaha
 

 

=IIf(InStr(Trim([GLTran.TranDesc]), 'EWT') > 0 OR [GLTran.TranDesc] = 'EWT FOR 4TH QTR 2022_DAP' ,'', [GLTran.CreditAmt] - [GLTran.DebitAmt])
 

Best answer by darylbowman

One of the ‘InStr’ functions (either GI or Report Designer) returns 0 when it doesn’t exist, and one returns -1. It may be that you need to use >= 0 depending upon where you’re working.

1 reply

darylbowman
Captain II
Forum|alt.badge.img+15
  • Answer
  • October 7, 2024

One of the ‘InStr’ functions (either GI or Report Designer) returns 0 when it doesn’t exist, and one returns -1. It may be that you need to use >= 0 depending upon where you’re working.