Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Can the following two expressions be combined into one expression:
Thanking you in advance
Regards.
like this?
=if(len(trim([Doctor Number]))=0, '00000',
if(len(trim([Doctor Number])) >=6 and [Retail Pharmacy]='PSMAS', '00001', [Doctor Number])) as [Doctor Number]
like this?
=if(len(trim([Doctor Number]))=0, '00000',
if(len(trim([Doctor Number])) >=6 and [Retail Pharmacy]='PSMAS', '00001', [Doctor Number])) as [Doctor Number]
HI,
Try like this
=If(Len(Trim([Doctor Number]))=0, '00000',
If(Len(Trim([Doctor Number])) >=6 AND[Retail Pharmacy]='PSMAS', '00001', [Doctor Number])) AS [Doctor Number]
Many thanks Bairaj, i will try it out and advise outcome
Regards
Thanks Jagan, i am trying this out and will let you know outcome
Regards.
Hi Chris,
This should work:
Thanks,
AS
Amit may thanks i am trying this out
if you have got the correct answer please mark the correct answer and close this thread
Hi Balraj
Many thanks that works. i have problems with using the if(Len(Trim function on its own and want to incorporate it with the NULL function as follows:
if(len(trim([Doctor Number]) = 0 or If(IsNull([Doctor Number])), '00000', if(len(trim([Doctor Number])) >= 7 and [Retail Pharmacy]='PSMAS', '00001', [Doctor Number])) as [Doctor Number]
There is something wrong with the above expression and i am failing to figure out the error. Kindly assist
Try:
if(IsNull([Doctor Number]),'00000',if(len(trim([Doctor Number])) >= 7 and [Retail Pharmacy]='PSMAS', '00001', [Doctor Number])) as [Doctor Number]
Thanks,
AS