Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have a scenario where there are three fields from the same table , let's say A, B, C which are Id's for a particular process. All these fields have both number and text in them. Now, I need to get the output as when A = Null then A=B, when B = Null then B = A , when A = null and B = Null, then C else A'/'B. but I need to get the output in a filed called Reference Number .
The problem is i am not able to achieve the third If condition when A = null and B = Null, then C and show it in the Reference Number = filed .
Below is the expression I have used.
if(len(trim(A))=0,text(B),
if(len(trim(B))=0,text(C),
if(len(trim(A))=0 and len(trim(B))=0,text(C),text(A)&'/'&text(B)))) as [Reference Number],
Thank you in Advance.
PV
Hi Pavan,
Could you put an example? I am afraid I donot understand you...
Regards,
H
Expression looks fine for me have you checked the data set that you that condition data or not ? if you have then share the sample data and app let's see what's the issue
Hi Hector,
Pls find the example, I hope it might help you to understand my question.
I think something like:
If(Len(Trim(A)) = 0 AND
Len(Trim(B)) = 0,
Trim(C),
Trim(A) & '/' & Trim(B)) AS Reference_Number
, could work fine...
Regards,
H
Thanks for the reply, but No change in the output. Not working for the third condition, when both A and B are null.
Regards,
PV
Hi Pavan,
that is the first test I do in the if sentence:
If(Len(Trim(A)) = 0 AND
Len(Trim(B)) = 0,
Trim(C),
Trim(A) & '/' & Trim(B)) AS Reference_Number
I attach you a sample...
Regards,
H
Hi Hector,
Thanks for your help, I wrote a equation as below and it worked,
if (Text(len(Trim ((A))))=0 and text(len(trim((B))))=0,C, (A)&'/'&(B) ) as [Reference Number ]
Thank you,
PV