I m working on a IF statement , however for One of my parameter , as a result i want only Account no's first digit starting with 4, so i thought of applying Left within IF statement-
Is this correct?
IF Contains([ACCOUNT NBR],1="4")THEN [A]+[B]ELSE [A]-[B) ENDIF
Solved! Go to Solution.
Hi @SakshiBan
I would use the Left() statement for this, but you have to make sure that your account number is a Text datatype. If this is the case your if statement will look like this:
IF Left([ACCOUNT NBR],1)="4" THEN...
If the Account number field is a number data type, you can modify the statement like so:
IF Left(ToString([ACCOUNT NBR]),1)="4" THEN...
IF LEFT([ACCOUNT NBR],1) = '4' THEN [A] + [B]
ELSE [A] - [B]
ENDIF
OR
IF StartsWith([ACCOUNT NBR], '4') THEN [A] + [B]
ELSE [A] - [B]
ENDIF
Thanks so much that was a great help!
Thanks so much that was a great help!